Open
Description
pint
's implementation of NEP-18 (see hgrecco/pint#905) is close enough so we can finally start working on the pint
support (i.e. make the integration tests pass). This would be the list of tasks to get there:
- integration tests:
- implement integration tests for
DataArray
,Dataset
and top-level functions (tests for arrays with units #3238, tests for datasets with units #3447, Tests for module-level functions with units #3493) - add tests for
Variable
as discussed in Tests for module-level functions with units #3493 (Tests for variables with units #3654) - clean up the current tests (Fix pint integration tests #3600)
- use the standard
assert_identical
andassert_allclose
functions (Pint support for top-level functions #3611, Pint support for DataArray #3643, Tests for variables with units #3654, Pint support for variables #3706, pint support for Dataset #3975) - clean up the
TestVariable.test_pad
tests
- implement integration tests for
- actually get xarray to support units:
- top-level functions (Pint support for top-level functions #3611)
-
Variable
(Pint support for variables #3706)rolling_window
andidentical
need larger modifications
-
DataArray
(Pint support for DataArray #3643) -
Dataset
- silence all the
UnitStrippedWarnings
in the testsuite (silence UnitStrippedWarnings #4163) - try to get
nanprod
to work with quantities - add support for per variable fill values (allow specifying a fill value per variable #4165)
-
repr
with units (Feature request: show units in dataset overview #2773) - type hierarchy (e.g. for
np.maximum(data_array, quantity)
vsnp.maximum(quantity, data_array)
) (Consistent Handling of Type Casting Hierarchy #3950)
- update the documentation
- point to pint-xarray (see document the duck array integration status #4530)
- mention the requirement for
UnitRegistry(force_ndarray=True)
orUnitRegistry(force_ndarray_like=True)
(see https://pint-xarray.readthedocs.io/en/stable/creation.html#attaching-units) - list the known issues (see Pint support for DataArray #3643 (comment) and Pint support for DataArray #3643 (comment)) (document the duck array integration status #4530):
pandas
(indexing)bottleneck
(bfill
,ffill
)scipy
(interp
)numbagg
(rolling_exp
)numpy.lib.stride_tricks.as_strided
:rolling
numpy.vectorize
:interpolate_na
-
update the install instructions (we can use standardthis should be done byconda
/pip
now)pint-xarray