Open
Description
ComponentTensor
makes the below assertion:
class ComponentTensor(Node):
__slots__ = ('children', 'multiindex', 'shape')
__back__ = ('multiindex',)
def __new__(cls, expression, multiindex):
assert not expression.shape
# Empty multiindex
if not multiindex:
return expression
# Collect shape
shape = tuple(index.extent for index in multiindex)
assert all(s >= 0 for s in shape) ## <- HERE
which cannot be done if none of the indices have an extext
.
This typically comes up when creating indices with gem.indices
which do not set the extent
property of the indices.