8000 Merge pull request #72 from lucascolley/array_namespace-error · data-apis/array-api-compat@d235910 · GitHub
[go: up one dir, main page]

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 d235910

Browse files
authored
Merge pull request #72 from lucascolley/array_namespace-error
MAINT: improve error message for `array_namespace`
2 parents 9e53230 + 4c1d7b9 commit d235910

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
@@ -99,7 +99,7 @@ def your_function(x, y):
9999
namespaces.add(torch)
100100
else:
101101
# TODO: Support Python scalars?
102-
raise TypeError("The input is not a supported array type")
102+
raise TypeError(f"{type(x).__name__} is not a supported array type")
103103

104104
if not namespaces:
105105
raise TypeError("Unrecognized array input")

0 commit comments

Comments
 (0)
0