I was using the method scipy.ndimage.map_coordinates, and it seemed to work fine in my code. However, when I called it from another method, it gave me a RuntimeError: coordinate array data type not supported.
Here is the traceback:
Traceback (most recent call last):
A = render_basis(images['hand'], 25)
tmp = np.sum(render(blocker, BX, BY), axis=(0, 1)
return (eval_blocker(blocker, lx, ly) * eval_irradiance(lx, ly))[...,np.newaxis] * images['paper']
return scipy.ndimage.map_coordinates(blocker,blocker_intersection[0:2], order=1)
_nd_image.geometric_transform(filtered, None, coordinates, None, None,
The problem seems to come from line 4, so I'll explain the shapes of both parameters: blocker is a (200,200) array, blocker_intersection is a (3, 200, 200) array (making blocker_intersection[0:2] a (2, 200, 200) array)
In line 2. the function render(blocker, BX, BY) takes as argument a (200, 200) blocker, and two (10, 10, 1, 1) BX, BY
I don't understand where the problem might come from, as it runs without error when I call it from outside of my method (render_basis)
Could someone help?
Thanks in advance