I think a simple for-loop is more readable than a multi-line generator expression. Also for `reduce(operator.mul, localshape, 1) == 0` I think you can just check `if 0 in localshape` like this:
```python
for localshape in self.get_localshapes():
    if 0 in localshape:
        raise NotImplementedError("Reduction ...")
```