summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@gmail.com>2016-09-11 13:47:04 -0700
committerGitHub <noreply@github.com>2016-09-11 13:47:04 -0700
commitc90d7c94fd2077d0beca48fa89a423da2b0bb663 (patch)
tree61ade0857266396bdb6e2cc020acb208a252a3a0 /numpy/core/numeric.py
parent742f6c21b3a6d61e4d43f798b03573547f763b3e (diff)
parentfa369d17e110717535860d8caea5bec44da53f42 (diff)
downloadnumpy-c90d7c94fd2077d0beca48fa89a423da2b0bb663.tar.gz
Merge pull request #8038 from gfyoung/rollaxis-err-msg
MAINT: Update error message in rollaxis.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index ad2dcc291..81d9d3697 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1531,12 +1531,12 @@ def rollaxis(a, axis, start=0):
axis += n
if start < 0:
start += n
- msg = 'rollaxis: %s (%d) must be >=0 and < %d'
+ msg = "'%s' arg requires %d <= %s < %d, but %d was passed in"
if not (0 <= axis < n):
- raise ValueError(msg % ('axis', axis, n))
+ raise ValueError(msg % ('axis', -n, 'axis', n, axis))
if not (0 <= start < n + 1):
- raise ValueError(msg % ('start', start, n + 1))
- if (axis < start):
+ raise ValueError(msg % ('start', -n, 'start', n + 1, start))
+ if axis < start:
# it's been removed
start -= 1
if axis == start: