Skip to content

Commit aeee808

Browse files
committed
block_apply func
1 parent 683087a commit aeee808

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/dataclay/contrib/persistent_block.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ def partial_sum(self, centers: np.ndarray) -> np.ndarray:
7676
def partial_histogram(self, n_bins: int, n_dimensions: int) -> np.ndarray:
7777
values, _ = np.histogramdd(self.block_data, n_bins, [(0, 1)] * n_dimensions)
7878
return values
79+
80+
@activemethod
81+
def block_apply(self, func, *args, **kwargs):
82+
return func(self.block_data, *args, **kwargs)

0 commit comments

Comments
 (0)