Skip to content

Commit

Permalink
Fix returns
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Jul 4, 2015
1 parent 158ec16 commit c7420e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion numprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def _assert_unit_convertability(name, value, target_unit):
if value.dimensionality != target_unit.dimensionality:
raise ValueError("{0} should be in units convertible to {1}".format(name, target_unit.units))

return

if HAS_QUANTITIES:

from quantities.unitquantity import IrreducibleUnit
Expand All @@ -187,4 +189,4 @@ def _assert_unit_convertability(name, value, target_unit):
if value.dimensionality.simplified != target_unit.dimensionality.simplified:
raise ValueError("{0} should be in units convertible to {1}".format(name, target_unit.dimensionality.string))

# Since we don't want to convert all values in an array,
return

0 comments on commit c7420e5

Please sign in to comment.