Skip to content

Commit

Permalink
Only flatten items if they're actually arrays (just in case they aren't)
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarDrew authored and Cadair committed Jan 16, 2024
1 parent 3d31a18 commit 4366a36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dkist/wcs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def evaluate(self, *inputs_):
else:
has_units = False
input_values = inputs_
input_values = [item.flatten() for item in input_values]
input_values = [item.flatten() if isinstance(item, np.ndarray) else item 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 4366a36

Please sign in to comment.