From aba258f8babcbfdcc7aa95e81514baee483225a7 Mon Sep 17 00:00:00 2001 From: Ken Kehoe Date: Wed, 15 Nov 2023 10:11:43 -0700 Subject: [PATCH] Resolving issue when checking if data is finite when the data object type is not a Numpy array. This will try to extract the numpy array from the DataArray. Wrapped in a try to catch when the data is already a numpy array or is something else. --- act/plotting/timeseriesdisplay.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/act/plotting/timeseriesdisplay.py b/act/plotting/timeseriesdisplay.py index 1756635052..948c48028d 100644 --- a/act/plotting/timeseriesdisplay.py +++ b/act/plotting/timeseriesdisplay.py @@ -683,6 +683,12 @@ def plot( our_data = ydata finite = np.isfinite(our_data) + # If finite is returned as DataArray or Dask array extract values. + try: + finite = finite.values + except AttributeError: + pass + if finite.any(): our_data = our_data[finite] if invert_y_axis is False: