Skip to content

Commit

Permalink
Add standardize keyword also to dummydatastore in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeloskarsson committed Dec 10, 2024
1 parent 0805ff6 commit 8f78ad9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/dummy_datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8f78ad9

Please sign in to comment.