-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently no way to create a Coordinates object without indexes for 1D variables #8704
Comments
Thanks @TomNicholas. There is a possible fix for this implemented in #8124. I've hit some general issues with the approach taken in that PR (described in the top comment) but I'm wondering if we couldn't cherry pick some of the commits there: 26fa16a and 7741b2a. I'm not sure this will just work, though. As an (ugly) workaround, xarray |
Thanks @benbovy!
That's useful, thanks.
That would be great. I'm wondering if the change inside |
Yes I think it will also fix this one. |
What happened?
The workaround described in #8107 (comment) does not seem to work on
main
, meaning that I think there is currently no way to create anxr.Coordinates
object without 1D variables being coerced to indexes. This means there is no way to create aDataset
object without 1D variables becomingIndexVariables
being coerced to indexes.What did you expect to happen?
I expected to at least be able to use the workaround described in #8107 (comment), i.e.
where
uarr
is an un-indexable array-like.Minimal Complete Verifiable Example
but in versions after that it triggers the NotImplementedError in
__array__
:MVCE confirmation
Relevant log output
No response
Anything else we need to know?
Context is #8699
Environment
Versions described above
The text was updated successfully, but these errors were encountered: