Open khaeru opened 3 years ago
27 should probably be done first.
While doing #37, it turns out that sparse.COO currently lacks some methods that xarray needs to implement its basic DataArray API. These include:
numpy.flip
, for xarray.bfill
.numpy.nancumprod
, for DataArray.cumprod
.numpy.pad
, for DataArray.shift
.These cases are now noted in the test suite, e.g.: https://github.com/khaeru/genno/blob/1ad7e5b95916ecf78ccd14cffb33decf84ea0793/genno/tests/core/test_quantity.py#L125-L128
genno is not the right place to implement them, so this issue needs to wait on those being implemented upstream.
https://xarray.pydata.org/en/stable/user-guide/duckarrays.html gives a summary of missing operations.
Inherited from iiasa/ixmp#191:
As of genno 1.0, all code is tested with both AttrSeries and SparseDataArray to minimize surprises on switching.
27 should probably be done first.