summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/einsumfunc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/core/einsumfunc.py b/numpy/core/einsumfunc.py
index c5b37b7e2..b7e81385f 100644
--- a/numpy/core/einsumfunc.py
+++ b/numpy/core/einsumfunc.py
@@ -700,14 +700,15 @@ def einsum_path(*operands, **kwargs):
sh = operands[tnum].shape
if len(sh) != len(term):
raise ValueError("Einstein sum subscript %s does not contain the "
- "correct number of indices for operand %d.",
- input_subscripts[tnum], tnum)
+ "correct number of indices for operand %d."
+ % (input_subscripts[tnum], tnum))
for cnum, char in enumerate(term):
dim = sh[cnum]
if char in dimension_dict.keys():
if dimension_dict[char] != dim:
raise ValueError("Size of label '%s' for operand %d does "
- "not match previous terms.", char, tnum)
+ "not match previous terms."
+ % (char, tnum))
else:
dimension_dict[char] = dim