Skip to content

Commit

Permalink
Merge pull request #1806 from andrewgsavage/delete_reduce_dimensions
Browse files Browse the repository at this point in the history
delete reduce_dimensions
  • Loading branch information
hgrecco authored Jul 14, 2023
2 parents 4df596d + b4c466d commit 86bce10
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions pint/facets/plain/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,6 @@
T = TypeVar("T", bound=Magnitude)


def reduce_dimensions(f):
def wrapped(self, *args, **kwargs):
result = f(self, *args, **kwargs)
try:
if result._REGISTRY.autoconvert_to_preferred:
result = result.to_preferred()
except AttributeError:
pass

try:
if result._REGISTRY.auto_reduce_dimensions:
return result.to_reduced_units()
else:
return result
except AttributeError:
return result

return wrapped


def ireduce_dimensions(f):
def wrapped(self, *args, **kwargs):
result = f(self, *args, **kwargs)
Expand Down

0 comments on commit 86bce10

Please sign in to comment.