We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22657e8 commit ec3213bCopy full SHA for ec3213b
1 file changed
lib/matplotlib/cbook.py
@@ -21,12 +21,11 @@
21
import types
22
import weakref
23
24
-from packaging.version import parse as parse_version
25
import numpy as np
26
27
-if parse_version(np.__version__) >= parse_version("1.25.0"):
28
- from numpy.exceptions import VisibleDeprecationWarning
29
-else:
+try:
+ from numpy.exceptions import VisibleDeprecationWarning # numpy >= 1.25
+except ImportError:
30
from numpy import VisibleDeprecationWarning
31
32
import matplotlib
0 commit comments