File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 10
10
from functools import wraps
11
11
12
12
import numpy
13
+ import scipy
13
14
import scipy .special as special
14
15
15
16
from .._config import get_config
@@ -105,9 +106,20 @@ def _check_array_api_dispatch(array_api_dispatch):
105
106
min_numpy_version = "1.21"
106
107
if numpy_version < parse_version (min_numpy_version ):
107
108
raise ImportError (
108
- f"NumPy must be { min_numpy_version } or newer to dispatch array using"
109
- " the API specification"
109
+ f"NumPy must be { min_numpy_version } or newer (found"
110
+ f" { numpy .__version__ } ) to dispatch array using"
111
+ " the array API specification"
110
112
)
113
+
114
+ scipy_version = parse_version (scipy .__version__ )
115
+ min_scipy_version = "1.14.0"
116
+ if scipy_version < parse_version (min_scipy_version ):
117
+ raise ImportError (
118
+ f"SciPy must be { min_scipy_version } or newer"
119
+ " (found {scipy.__version__}) to dispatch array using"
120
+ " the array API specification"
121
+ )
122
+
111
123
if os .environ .get ("SCIPY_ARRAY_API" ) != "1" :
112
124
warnings .warn (
113
125
(
You can’t perform that action at this time.
0 commit comments