From c09bca9c76f0262a40e933d730a195e66791ae02 Mon Sep 17 00:00:00 2001 From: jklenzing Date: Thu, 7 Sep 2023 11:02:14 -0400 Subject: [PATCH] BUG: don't clean symmetric matrices --- pysatNASA/instruments/methods/general.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysatNASA/instruments/methods/general.py b/pysatNASA/instruments/methods/general.py index 1d075c46..1bee292d 100644 --- a/pysatNASA/instruments/methods/general.py +++ b/pysatNASA/instruments/methods/general.py @@ -67,8 +67,10 @@ def clean(self): coords = [key for key in self.data.coords.keys()] for key in self.variables: + # Check for symmetric dims + unique_dims = len(self[key].dims) == len(np.unique(self[key].dims)) # Skip over the coordinates when cleaning - if key not in coords: + if key not in coords and unique_dims: fill = self.meta[key, self.meta.labels.fill_val] # Replace fill with nan