Skip to content

Commit 714b833

Browse files
committed
move shape1
1 parent ac29a02 commit 714b833

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activestorage/active.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ def _from_storage(self, stripped_indexer, drop_axes, out_shape, out_dtype,
385385
if method is not None:
386386
# Apply the method (again) to aggregate the result
387387
out = method(out)
388-
388+
shape1 = (1,) * len(out_shape)
389+
389390
if self._components:
390391
# Return a dictionary of components containing the
391392
# reduced data and the sample size ('n'). (Rationale:
@@ -399,7 +400,6 @@ def _from_storage(self, stripped_indexer, drop_axes, out_shape, out_dtype,
399400
# reductions require the per-dask-chunk partial
400401
# reductions to retain these dimensions so that
401402
# partial results can be concatenated correctly.)
402-
shape1 = (1,) * len(out_shape)
403403
out = out.reshape(shape1)
404404

405405
n = np.sum(counts).reshape(shape1)

0 commit comments

Comments
 (0)