10000 MAINT: Use AxisError in more places by eric-wieser · Pull Request #8843 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Use AxisError in more places #8843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 29, 2017
Prev Previous commit
Next Next commit
MAINT: Remove manual error message
  • Loading branch information
eric-wieser committed Mar 28, 2017
commit cd01f01e9238bf3d4d42613d804e06d35b94b48f
2 changes: 1 addition & 1 deletion numpy/ma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4362,7 +4362,7 @@ def count(self, axis=None, keepdims=np._NoValue):

if self.shape is ():
if axis not in (None, 0):
raise np.AxisError("'axis' entry is out of bounds")
raise np.AxisError(axis=axis, ndim=self.ndim)
return 1
elif axis is None:
if kwargs.get('keepdims', False):
Expand Down
0