Skip to content

Commit eb6ea6c

Browse files
author
Kurt Smith
committed
Simplify conditional.
1 parent 40fdf33 commit eb6ea6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

distarray/dist/distarray.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,7 @@ def inner_fill(arr, value):
269269

270270
def _reduce(self, local_reduce_name, axes=None, dtype=None, out=None):
271271

272-
if any(reduce(operator.mul, localshape, 1) == 0
273-
for localshape in self.get_localshapes()):
272+
if any(0 in localshape for localshape in self.get_localshapes()):
274273
raise NotImplementedError("Reduction not implemented for empty LocalArrays")
275274

276275
if out is not None:

0 commit comments

Comments
 (0)