Skip to content

Commit

Permalink
Update _compat_numpy_funcs_bit_operation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Jun 11, 2024
1 parent d702944 commit b0154ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brainunit/math/_compat_numpy_funcs_bit_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def wrap_elementwise_bit_operation_binary(func):
def f(x, y, *args, **kwargs):
if isinstance(x, Quantity) or isinstance(y, Quantity):
raise ValueError(f'Expected integers, got {x} and {y}')
elif isinstance(x, (jax.Array, np.ndarray)) and isinstance(y, (jax.Array, np.ndarray, number)):
elif isinstance(x, (jax.Array, np.ndarray)) and isinstance(y, (jax.Array, np.ndarray, int, float)):
return func(x, y, *args, **kwargs)
else:
raise ValueError(f'Unsupported types {type(x)} and {type(y)} for {func.__name__}')
Expand Down

0 comments on commit b0154ab

Please sign in to comment.