You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, NamedArray's backing data can fulfill _arrayfunction although in practice, PandasIndexingAdapter and PandasExtensionArray don't actually fulfill this contract (although the later is much closer than the former). The following two lines are particularly problematic for non-numeric data:
FWIW numpy arrays do always fulfill this even when it doesn't make sense (even object dtypes have a imag and real). So I'm not sure how to move forward.
Of course, another issue is the whole _DType_co being bound to numpy. __getitem__ can return pandas dtypes but __array__ won't so maybe we need a base dtype and then a numpy one as well in the generic for the class?
The text was updated successfully, but these errors were encountered:
What is your issue?
See: #9671 (comment)
At the moment,
NamedArray
's backing data can fulfill_arrayfunction
although in practice,PandasIndexingAdapter
andPandasExtensionArray
don't actually fulfill this contract (although the later is much closer than the former). The following two lines are particularly problematic for non-numeric data:xarray/xarray/namedarray/_typing.py
Lines 188 to 192 in d57f05c
FWIW
numpy
arrays do always fulfill this even when it doesn't make sense (evenobject
dtypes have aimag
andreal
). So I'm not sure how to move forward.Of course, another issue is the whole
_DType_co
being bound tonumpy
.__getitem__
can return pandas dtypes but__array__
won't so maybe we need a base dtype and then a numpy one as well in the generic for the class?The text was updated successfully, but these errors were encountered: