Skip to content

Commit

Permalink
Fix import for numpy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Sep 7, 2023
1 parent a7c8e35 commit 2e5c326
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion brian2/units/fundamentalunits.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@
from warnings import warn

import numpy as np
from numpy import VisibleDeprecationWarning

try:
from numpy.exceptions import VisibleDeprecationWarning # numpy 2.x
except ImportError:
from numpy import VisibleDeprecationWarning # numpy 1.x

from sympy import latex

__all__ = [
Expand Down

0 comments on commit 2e5c326

Please sign in to comment.