Skip to content

Commit 3af4f2a

Browse files
committed
Fix version check logic
1 parent c51249a commit 3af4f2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_compat/common/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def is_array_api_obj(x):
8080
def _check_api_version(api_version):
8181
if api_version == '2021.12':
8282
warnings.warn("The 2021.12 version of the array API specification was requested but the returned namespace is actually version 2022.12")
83-
if api_version is not None and api_version != '2022.12':
83+
elif api_version is not None and api_version != '2022.12':
8484
raise ValueError("Only the 2022.12 version of the array API specification is currently supported")
8585

8686
def array_namespace(*xs, api_version=None, _use_compat=True):

0 commit comments

Comments
 (0)