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