Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4798651

Browse filesBrowse files
committed
set_array_api_strict_flags is not present in earlier versions
1 parent 9998d12 commit 4798651
Copy full SHA for 4798651

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed

‎sklearn/utils/_array_api.py

Copy file name to clipboardExpand all lines: sklearn/utils/_array_api.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,9 @@ def get_namespace(*arrays, remove_none=True, remove_types=(str,), xp=None):
557557
if namespace.__name__ in {"cupy.array_api"}:
558558
namespace = _ArrayAPIWrapper(namespace)
559559

560-
if namespace.__name__ == "array_api_strict":
560+
if namespace.__name__ == "array_api_strict" and hasattr(
561+
namespace, "set_array_api_strict_flags"
562+
):
561563
namespace.set_array_api_strict_flags(api_version="2023.12")
562564

563565
return namespace, is_array_api_compliant

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.