Skip to content

Commit

Permalink
Remove __slots__ from exceptions
Browse files Browse the repository at this point in the history
The superclasses do not have __slots__, so it does nothing.
  • Loading branch information
asmeurer committed Feb 16, 2024
1 parent d02c61f commit e723df4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ndindex/shapetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class BroadcastError(ValueError):
compatible.
"""
__slots__ = ("arg1", "shape1", "arg2", "shape2")

def __init__(self, arg1, shape1, arg2, shape2):
self.arg1 = arg1
self.shape1 = shape1
Expand All @@ -33,8 +31,6 @@ class AxisError(ValueError, IndexError):
`iter_indices` does not need to depend on NumPy.
"""
__slots__ = ("axis", "ndim")

def __init__(self, axis, ndim):
# NumPy allows axis=-1 for 0-d arrays
if (ndim < 0 or -ndim <= axis < ndim) and not (ndim == 0 and axis == -1):
Expand Down

0 comments on commit e723df4

Please sign in to comment.