source: https://arrayfire.org/docs/group__transform__func__coordinates.htm#gad6a3e6fde0cff195c8c308762e57bd52