Skip to content

Commit

Permalink
keep compatibility with the development version of pint (#341)
Browse files Browse the repository at this point in the history
* import from the new locations and fall back to the old ones

* use standard definition syntax instead
  • Loading branch information
keewis authored Jun 28, 2022
1 parent 33ce60b commit ef7534d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cf_xarray/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ def repl(m):
force_ndarray_like=True,
)

units.define(
pint.unit.UnitDefinition("percent", "%", (), pint.converters.ScaleConverter(0.01))
)
units.define("percent = 0.01 = %")

# Define commonly encountered units (both CF and non-CF) not defined by pint
units.define("@alias meter = gpm")
Expand Down

0 comments on commit ef7534d

Please sign in to comment.