-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Prevent pydap (dap4) to change string arrays to unicode type (testing). Fixed upstream #10482
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
Conversation
Nice |
# pydap <3.5.6 converts to unicode dtype=|U. Not what | ||
# xarray expects. Thus force to bytes dtype. pydap >=3.5.6 | ||
# does not convert to unicode. https://github.com/pydap/pydap/issues/510 | ||
actual["bears"].values = actual["bears"].values.astype("S") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so I understand: pydap is changing behaviour and we are enforcing that new behaviour always?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my understanding, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sort of... It was more like pydap was always enforcing a change from "S"
--> "U"
, which was not jiving with xarray. Beginning with the new version it will no longer enforce the change to unicode. Once the minimal pydap version moves up from 3.5.0
--> 3.5.6
this line won't be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to get this in soon, Numpy 2.3.1 is out (on conda-forge since yesterday) and it fails already on main.
pydap
backend).addednow pass on both min-dependencies environment (pydap 3.5.0
which has numpy<2) and with python=3.12 (nightly?)whats-new.rst