-
Notifications
You must be signed in to change notification settings - Fork 42
add bounds property #214
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
add bounds property #214
Conversation
Codecov Report
@@ Coverage Diff @@
## main #214 +/- ##
==========================================
+ Coverage 96.27% 96.32% +0.04%
==========================================
Files 12 12
Lines 1505 1525 +20
==========================================
+ Hits 1449 1469 +20
Misses 56 56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
dcherian
left a comment
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.
Thanks! Looks great
|
I think we can raise an error for it's pretty easy to just do The current repr is fine IMO. We can update is someone complains |
* main: (57 commits) Add CITATION.cff, tributors, zenodo.json (xarray-contrib#231) Add zenodo badge Improve `rename_like` (xarray-contrib#222) Don't apply mappers to DataArrays (xarray-contrib#227) Add unit support to cf-xarray (xarray-contrib#197) Update README.rst Add earthcube 2021 notebook link to readme v0.5.2 Some CMIP6 support Add pooch to binder environment (xarray-contrib#223) `add_bounds` uses `keys` rather than `dims` (xarray-contrib#221) Add .cf.formula_terms (xarray-contrib#213) Update whats-new.rst (xarray-contrib#217) add bounds property (xarray-contrib#214) Update some tests. Compile regexes Fix black Add __version__ (xarray-contrib#208) add skip to rename_like (xarray-contrib#206) Refactor out coordinate criteria to criteria.py (xarray-contrib#205) ...
Closes #210
Closes #215
What should we do with DataArrays, where we can't have bounds because of the extra dimension?
Currently nothing specific is done. For example, when we extract a
DataArrayfrom aDataset,da.cf.boundsis not empty, as we don't pop theboundsattribute from the coordinates. However,da.cf.__repr__showsBounds: n/aas the bounds variables are not present.Should
cf.boundsonly include variables present in the object (and warn about missing bounds)?Should
cf.boundsbe a property ofDatasetsonly?Should we pop the
boundsattribute from coordinates when extracting aDataArray?Should we only show
Boundsin the representation of Datasets?