Skip to content
Snippets Groups Projects
Commit 3b129f3f authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

grid: add 'any_masked' property

parent 9913aa22
No related branches found
No related tags found
1 merge request!258Grid mask support
Pipeline #186353 failed with stages
in 2 minutes and 40 seconds
......@@ -36,6 +36,11 @@ class GridBase(ABC):
def mask(self):
"""np.ndarray or None: Data mask."""
@property
def any_masked(self):
"""bool: Whether any point in the grid is masked."""
return self.mask is not None and np.any(self.mask)
@property
@abstractmethod
def dim(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment