1. Pypy
  2. Untitled project
  3. pypy

Commits

Brian Kearns  committed 2fc0e3a

cleanup these error messages

  • Participants
  • Parent commits 47108b0
  • Branches default

Comments (0)

Files changed (1)

File pypy/module/micronumpy/arrayimpl/concrete.py

View file
  • Ignore whitespace
                 idx = self.get_shape()[i] + idx
             if idx < 0 or idx >= self.get_shape()[i]:
                 raise operationerrfmt(space.w_IndexError,
-                      "index (%d) out of range (0<=index<%d", i, self.get_shape()[i],
+                      "index %d is out of bounds for axis %d with size %d",
+                      idx, i, self.get_shape()[i],
                 )
             item += idx * strides[i]
         return item
                 idx = shape[i] + idx
             if idx < 0 or idx >= shape[i]:
                 raise operationerrfmt(space.w_IndexError,
-                      "index (%d) out of range (0<=index<%d", i, shape[i],
+                      "index %d is out of bounds for axis %d with size %d",
+                      idx, i, self.get_shape()[i],
                 )
             item += idx * strides[i]
         return item