File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 16
16
import sys
17
17
import math
18
18
import inspect
19
+ import warnings
19
20
20
21
def is_numpy_array (x ):
21
22
# Avoid importing NumPy if it isn't already
@@ -77,8 +78,10 @@ def is_array_api_obj(x):
77
78
or hasattr (x , '__array_namespace__' )
78
79
79
80
def _check_api_version (api_version ):
80
- if api_version is not None and api_version != '2021.12' :
81
- raise ValueError ("Only the 2021.12 version of the array API specification is currently supported" )
81
+ if api_version == '2021.12' :
82
+ warnings .warn ("The 2021.12 version of the array API specification was requested but the returned namespace is actually version 2022.12" )
83
+ elif api_version is not None and api_version != '2022.12' :
84
+ raise ValueError ("Only the 2022.12 version of the array API specification is currently supported" )
82
85
83
86
def array_namespace (* xs , api_version = None , _use_compat = True ):
84
87
"""
You can’t perform that action at this time.
0 commit comments