Skip to content

add import guard to import relocated AxisError as of numpy-2.0#180

Merged
agurvich merged 2 commits intomainfrom
bugfix/numpy-2.0-support
Oct 5, 2024
Merged

add import guard to import relocated AxisError as of numpy-2.0#180
agurvich merged 2 commits intomainfrom
bugfix/numpy-2.0-support

Conversation

@agurvich
Copy link
Copy Markdown
Collaborator

@agurvich agurvich commented Oct 5, 2024

Add numpy 2.0 support by doing:

import numpy as np
## numpy-1.X
try: AxisError = np.AxisError
## numpy-2.X
except: from numpy.exceptions import AxisError

...

raise AxisError

@agurvich agurvich added the bug label Oct 5, 2024
@agurvich agurvich merged commit b38ea92 into main Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant