Skip to content

Commit

Permalink
Merge branch 'main' into vecdot-conj
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer authored Nov 19, 2024
2 parents 07043a0 + 382bbac commit 89a85a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions array_api_compat/common/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ def your_function(x, y):

namespaces = set()
for x in xs:
if isinstance(x, (bool, int, float, complex, type(None))):
continue
elif is_numpy_array(x):
if is_numpy_array(x):
from .. import numpy as numpy_namespace
import numpy as np
if use_compat is True:
Expand Down Expand Up @@ -558,6 +556,8 @@ def your_function(x, y):
if use_compat is True:
raise ValueError("The given array does not have an array-api-compat wrapper")
namespaces.add(x.__array_namespace__(api_version=api_version))
elif isinstance(x, (bool, int, float, complex, type(None))):
continue
else:
# TODO: Support Python scalars?
raise TypeError(f"{type(x).__name__} is not a supported array type")
Expand Down

0 comments on commit 89a85a6

Please sign in to comment.