Skip to content

Commit

Permalink
Update _base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Dec 3, 2024
1 parent c697fa6 commit efcfd75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brainunit/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4468,7 +4468,7 @@ def new_f(*args, **kwds):
elif specific_unit == 1:
if isinstance(v, Quantity):
newkeyset[n] = v.to_decimal()
elif isinstance(v, jax.typing.ArrayLike):
elif isinstance(v, (jax.Array, np.ndarray, int, float, complex)):
newkeyset[n] = v
else:
specific_unit = jax.typing.ArrayLike
Expand Down Expand Up @@ -4502,7 +4502,7 @@ def new_f(*args, **kwds):
elif specific_unit == 1:
if isinstance(result, Quantity):
result = result.to_decimal()
elif isinstance(result, jax.typing.ArrayLike):
elif isinstance(result, (jax.Array, np.ndarray, int, float, complex)):
result = jnp.asarray(result)
else:
specific_unit = jax.typing.ArrayLike
Expand Down

0 comments on commit efcfd75

Please sign in to comment.