neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
96 stars 8 forks source link

Make xarray objects unit-aware via Pint-xarray #141

Open niksirbi opened 6 months ago

niksirbi commented 6 months ago

xarray wraps Pint-xarray allowing the assignment of physical units.

Relevant example from the above article:

ds = xr.Dataset({'a': 2, 'b': 10})

ds.pint.quantify({'a': 'kg',
                  'b': pint.Unit('moles')})