From e6fcf969f06525cbf659a7df395950c05431d128 Mon Sep 17 00:00:00 2001 From: zssherman Date: Mon, 21 Oct 2024 17:45:29 -0500 Subject: [PATCH] FIX: Update data utils and plot_qc to fix issues with new environment. --- act/utils/data_utils.py | 1 + docs/source/_static/act-theme.css | 2 +- examples/qc/plot_qc_example.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/act/utils/data_utils.py b/act/utils/data_utils.py index 7b968c27f4..361c1b6568 100644 --- a/act/utils/data_utils.py +++ b/act/utils/data_utils.py @@ -112,6 +112,7 @@ def change_units( self._ds[var_name].attrs = attrs except ( KeyError, + TypeError, pint.errors.DimensionalityError, pint.errors.UndefinedUnitError, np._core._exceptions.UFuncTypeError, diff --git a/docs/source/_static/act-theme.css b/docs/source/_static/act-theme.css index e273fa1ace..2bde6c9f2a 100644 --- a/docs/source/_static/act-theme.css +++ b/docs/source/_static/act-theme.css @@ -46,4 +46,4 @@ div[class^="highlight"] a { .bd-sidebar-secondary div { border-left: none; -} \ No newline at end of file +} diff --git a/examples/qc/plot_qc_example.py b/examples/qc/plot_qc_example.py index 69513083c5..0f1d6fa3db 100644 --- a/examples/qc/plot_qc_example.py +++ b/examples/qc/plot_qc_example.py @@ -79,7 +79,7 @@ diff = np.diff(data) max_difference = 0.04 data = np.ma.masked_greater(diff, max_difference) -index = np.where(data.mask is True)[0] +index = np.where(data.mask == True)[0] result = ds.qcfilter.add_test( var_name, index=index,