Fix ValueError because ValueError 'Axis out of bounds' is changed to AxisError at numpy >= 1.13.
@@ -767,7 +767,7 @@ cdef class ndarray:
if axis < 0:
axis += ndim
if not (0 <= axis < ndim):
- raise ValueError('Axis out of range')
+ raise _AxisError('Axis out of range')
if axis == ndim - 1:
data = self
@@ -873,7 +873,7 @@ cdef class ndarray:
if axis < 0:
axis += ndim
if not (0 <= axis < ndim):
- raise ValueError('Axis out of range')
+ raise _AxisError('Axis out of range')
length = self.shape[axis]
if isinstance(kth, int):
