Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Dec 28, 2024
1 parent 31f1946 commit 50964eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions brainunit/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4922,6 +4922,13 @@ def _remove_unit(fname, n, unit, v):
f"object for argument '{n}' but got '{v}'"
)

elif unit == 1:
if isinstance(v, Quantity):
raise TypeError(
f"Function '{fname}' expected a Number object for argument '{n}' but got '{v}'"
)
return v

else:
raise TypeError(
f"Function '{fname}' expected a target unit object or"
Expand Down

0 comments on commit 50964eb

Please sign in to comment.