From 8f78ad98aeffbd7ac3c2c2c8318297d98b34c371 Mon Sep 17 00:00:00 2001 From: joeloskarsson Date: Mon, 9 Dec 2024 18:55:31 -0800 Subject: [PATCH] Add standardize keyword also to dummydatastore in tests --- tests/dummy_datastore.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/dummy_datastore.py b/tests/dummy_datastore.py index 9075d404..5525f362 100644 --- a/tests/dummy_datastore.py +++ b/tests/dummy_datastore.py @@ -301,7 +301,7 @@ def get_standardization_dataarray(self, category: str) -> xr.Dataset: return ds_standardization def get_dataarray( - self, category: str, split: str + self, category: str, split: str, standardize: bool = False ) -> Union[xr.DataArray, None]: """ Return the processed data (as a single `xr.DataArray`) for the given @@ -340,7 +340,13 @@ def get_dataarray( """ dim_order = self.expected_dim_order(category=category) - return self.ds[category].transpose(*dim_order) + + da_category = self.ds[category].transpose(*dim_order) + + if standardize: + return self._standardize_datarray(da_category, category=category) + + return da_category @cached_property def boundary_mask(self) -> xr.DataArray: