Commit ff17c6cf authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Fix (dask) meta handling in spell functions (backport of !167)

parent fd9f39c8
......@@ -31,7 +31,8 @@ class SpellLength(ThresholdMixin, ReducerMixin, IndexFunction):
data = da.moveaxis(data, axis, -1)
res = da.reduction(data, self.chunk, self.aggregate,
keepdims=True, output_size=4,
axis=-1, dtype=int, concatenate=False)
axis=-1, dtype=int, concatenate=False,
meta=np.array((), dtype=int))
res =,
np.broadcast_to(mask[..., np.newaxis],
......@@ -39,7 +40,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)
Supports Markdown
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