Skip to content

Commit ef7534d

Browse files
authored
keep compatibility with the development version of pint (#341)
* import from the new locations and fall back to the old ones * use standard definition syntax instead
1 parent 33ce60b commit ef7534d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cf_xarray/units.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ def repl(m):
7777
force_ndarray_like=True,
7878
)
7979

80-
units.define(
81-
pint.unit.UnitDefinition("percent", "%", (), pint.converters.ScaleConverter(0.01))
82-
)
80+
units.define("percent = 0.01 = %")
8381

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

0 commit comments

Comments
 (0)