Skip to content

Commit 33a5529

Browse files
committed
demo of numerical ops involving coords
1 parent 798d050 commit 33a5529

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/agnostic/pint.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,13 @@ quantified.sel(
8686
```
8787

8888
(`pint` considers values without units as "dimensionless")
89+
90+
### Numerical operations
91+
92+
We can also perform numerical operations, like integration:
93+
94+
```{python}
95+
quantified["windspeed"].integrate("months")
96+
```
97+
98+
Note how the units are displayed as `"meter * months / second"` and not the expected `"meter"`? This is caused by `pint` trying avoid implicit conversions as much as possible, which can substantially reduce the amount of computations.

0 commit comments

Comments
 (0)