summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index cec7a7ac9..eeb1d37aa 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -742,7 +742,7 @@ def fill_diagonal(a, val):
# all dimensions equal, so we check first.
if not alltrue(diff(a.shape)==0):
raise ValueError("All dimensions of input must be of equal length")
- step = cumprod((1,) + a.shape[:-1]).sum()
+ step = 1 + (cumprod(a.shape[:-1])).sum()
# Write the value out into the diagonal.
a.flat[::step] = val