Skip to content

Commit d43d8c8

Browse files
committed
Merge remote-tracking branch 'origin/2024_12_types' into 2024_12_types
2 parents 123b11a + b67865f commit d43d8c8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/array_api_extra/_lib/_utils/_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def is_python_scalar(x: object) -> TypeIs[complex]: # numpydoc ignore=PR01,RT01
105105
"""Return True if `x` is a Python scalar, False otherwise."""
106106
# isinstance(x, float) returns True for np.float64
107107
# isinstance(x, complex) returns True for np.complex128
108+
# bool is a subclass of int
108109
return isinstance(x, int | float | complex) and not is_numpy_array(x)
109110

110111

0 commit comments

Comments
 (0)