Skip to content

Commit

Permalink
return stacked coords by default from BaseRegularGridDatastore.get_xy()
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Nov 18, 2024
1 parent 93c20fc commit f6da2b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions neural_lam/datastore/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def grid_shape_state(self) -> CartesianGridShape:
pass

@abc.abstractmethod
def get_xy(self, category: str, stacked: bool) -> np.ndarray:
def get_xy(self, category: str, stacked: bool = True) -> np.ndarray:
"""Return the x, y coordinates of the dataset.
Parameters
Expand All @@ -447,7 +447,9 @@ def get_xy(self, category: str, stacked: bool) -> np.ndarray:
stacked : bool
Whether to stack the x, y coordinates. The parameter `stacked` has
been introduced in this class. Parent class `BaseDatastore` has the
same method signature but without the `stacked` parameter.
same method signature but without the `stacked` parameter. Defaults
to `True` to match the behaviour of `BaseDatastore.get_xy()` which
always returns the coordinates stacked.
Returns
-------
Expand Down

0 comments on commit f6da2b2

Please sign in to comment.