File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Original file line number Diff line number Diff line change 23
23
24
24
import numpy as np
25
25
26
+ try :
27
+ from numpy .exceptions import VisibleDeprecationWarning # numpy >= 1.25
28
+ except ImportError :
29
+ from numpy import VisibleDeprecationWarning
30
+
26
31
import matplotlib
27
32
from matplotlib import _api , _c_internal_utils
28
33
@@ -1064,7 +1069,7 @@ def _combine_masks(*args):
1064
1069
raise ValueError ("Masked arrays must be 1-D" )
1065
1070
try :
1066
1071
x = np .asanyarray (x )
1067
- except (np . VisibleDeprecationWarning , ValueError ):
1072
+ except (VisibleDeprecationWarning , ValueError ):
1068
1073
# NumPy 1.19 raises a warning about ragged arrays, but we want
1069
1074
# to accept basically anything here.
1070
1075
x = np .asanyarray (x , dtype = object )
@@ -1658,7 +1663,7 @@ def index_of(y):
1658
1663
pass
1659
1664
try :
1660
1665
y = _check_1d (y )
1661
- except (np . VisibleDeprecationWarning , ValueError ):
1666
+ except (VisibleDeprecationWarning , ValueError ):
1662
1667
# NumPy 1.19 will warn on ragged input, and we can't actually use it.
1663
1668
pass
1664
1669
else :
You can’t perform that action at this time.
0 commit comments