Skip to content

Commit

Permalink
Flatten arrays in ravel evaluation
Browse files Browse the repository at this point in the history
Otherwise it breaks real hard when you try to pass multiple points
into pixel_to_world, because of array broadcasting
  • Loading branch information
SolarDrew authored and Cadair committed Jan 16, 2024
1 parent 4db18bf commit 3d31a18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dkist/wcs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ def evaluate(self, *inputs_):
else:
has_units = False
input_values = inputs_
input_values = [item.flatten() for item in input_values]
# round the index values, but clip them if they exceed the array bounds
# the bounds are one less than the shape dimension value
array_bounds = np.array(self.array_shape) - 1
Expand Down

0 comments on commit 3d31a18

Please sign in to comment.