einx.errors.RankError#
- exception einx.errors.RankError(invocation, message, pos=None, constraints=None)#
This error occurs if the ranks (i.e. number of dimensions) of all expressions cannot be determined under the given input tensor shapes and additional constraints.
Example
>>> x = np.random.rand(3, 4) >>> einx.id("a b c -> a c b", x) einx.errors.RankError: The number of tensor dimensions and axes in the expression does not match. The operation was called with the following arguments: - Positional argument #1: Tensor with shape (3, 4)