From 4366a360104cd0734a581c34c8d803c678c8b4da Mon Sep 17 00:00:00 2001 From: Drew Leonard Date: Mon, 6 Nov 2023 14:15:33 +0000 Subject: [PATCH] Only flatten items if they're actually arrays (just in case they aren't) --- dkist/wcs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dkist/wcs/models.py b/dkist/wcs/models.py index 28fabc16..3bf7eaa6 100755 --- a/dkist/wcs/models.py +++ b/dkist/wcs/models.py @@ -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