Skip to content

Commit 456a475

Browse files
committed
instantiate the ureg
1 parent a0c598b commit 456a475

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/agnostic/pint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ Note how all variables are associated with a {py:class}`pint.Quantity` array, an
7070
With the `PintIndex`, selecting with quantities will convert the indexers to the index' units:
7171

7272
```{code-cell} python
73+
ureg = quantified.pint.registry
74+
7375
quantified.sel(
7476
latitude=slice(ureg.Quantity(4800, "arcmin"), ureg.Quantity(600, "arcmin")),
7577
longitude=slice(ureg.Quantity(-10, "degree"), ureg.Quantity(np.pi, "radians")),

0 commit comments

Comments
 (0)