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

grid: add data_points_compressed method

parent 980bda8e
No related branches found
No related tags found
1 merge request!258Grid mask support
Pipeline #177443 passed with stages
in 4 minutes and 47 seconds
......@@ -295,6 +295,14 @@ class Grid(GridBase):
out[~mask] = data
return np.reshape(out, self.data_shape, order=self.order)
@property
def data_points_compressed(self):
"""Points of the associated compressed data."""
if self.mask is None:
return self.data_points
# return only unmasked data points
return self.data_points[~np.reshape(self.mask, -1, order=self.order)]
class StructuredGrid(Grid):
"""Abstract structured grid specification."""
......
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