-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
issue #5791, dims & cords inference from xarray #6514
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
issue #5791, dims & cords inference from xarray #6514
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6514 +/- ##
===========================================
- Coverage 94.74% 82.54% -12.20%
===========================================
Files 146 147 +1
Lines 27807 27951 +144
===========================================
- Hits 26346 23073 -3273
- Misses 1461 4878 +3417
|
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.
split_key = key.split(".", 1)
if len(split_key) != 2:
> raise KeyError(key)
E KeyError: 'dim'
../../../miniconda3/envs/pymc-test/lib/python3.9/site-packages/xarray/core/dataset.py:185: KeyError
oh, good catch. It seems like I put the quotes around dim in line 241 by mistake |
@twiecki , it seems like my expectations on how the coords values should look like aren't good, could you check if I'm going in the right direction? I'm not sure if my initial assumption is correct and there's a bug I need to find, or the assumption is wrong and I should change it |
Best run mypy locally by
|
Can I change the type hinting within the Data.coords? It expects to have the keys with type Sequence, but unfortunately ndarray from numpy acts 1:1 like a sequence, but it doesn't inherit from Sequence, therefore it's not of a Sequence type. |
@michaelosthege Can we merge this? |
Thanks @michaelraczycki |
added dim inference from xarray, deprecation warning and unittest for the new feature
What is this PR about?
Addresses changes requested in Issue #5791
New features
Documentation