0

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):

  1. A = render_basis(images['hand'], 25)

  2. tmp = np.sum(render(blocker, BX, BY), axis=(0, 1)

  3. return (eval_blocker(blocker, lx, ly) * eval_irradiance(lx, ly))[...,np.newaxis] * images['paper']

  4. return scipy.ndimage.map_coordinates(blocker,blocker_intersection[0:2], order=1)

  5. _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

Eboyer
  • 23
  • 5
  • Please provide the actual code, not a description of it. Embed it using the `{}` button, give a sample input. Provide also the full Traceback message. – Mr. T Nov 03 '20 at 16:20

0 Answers0