Commit 6faa668f authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Fix (dask) meta handling in spell functions (closes #242)

parent c3e5c17a
......@@ -36,6 +36,7 @@ class SpellLength(ThresholdMixin, ReducerMixin, IndexFunction):
axis=-1,
dtype=int,
concatenate=False,
meta=np.array((), dtype=int),
)
res = da.ma.masked_array(
da.ma.getdata(res), np.broadcast_to(mask[..., np.newaxis], res.shape)
......@@ -44,7 +45,7 @@ class SpellLength(ThresholdMixin, ReducerMixin, IndexFunction):
def chunk(self, raw_data, axis, keepdims, computing_meta=False):
if computing_meta:
return np.array((0,), ndim=1, dtype=int)
return np.array((), dtype=int)
data = self.condition(raw_data, self.threshold.points)
chunk_res = self.kernels.chunk(data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment