Fix dayofweek and dayofyear attributes from dates generated by cftime_range#2633
Merged
shoyer merged 5 commits intopydata:masterfrom Dec 28, 2018
Merged
Fix dayofweek and dayofyear attributes from dates generated by cftime_range#2633shoyer merged 5 commits intopydata:masterfrom
shoyer merged 5 commits intopydata:masterfrom
Conversation
|
Hello @spencerkclark! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on December 26, 2018 at 14:02 Hours UTC |
Contributor
|
I think we should include this workaround and plan to bump up the minimum cftime version sometime soon. |
Member
|
agreed, thanks! |
dcherian
pushed a commit
to yohai/xarray
that referenced
this pull request
Jan 2, 2019
* master: DEP: drop python 2 support and associated ci mods (pydata#2637) TST: silence warnings from bottleneck (pydata#2638) revert to dev version DOC: fix docstrings and doc build for 0.11.1 Source encoding always set when opening datasets (pydata#2626) Add flake check to travis (pydata#2632) Fix dayofweek and dayofyear attributes from dates generated by cftime_range (pydata#2633) silence import warning (pydata#2635) fill_value in shift (pydata#2470) Flake fixed (pydata#2629) Allow passing of positional arguments in `apply` for Groupby objects (pydata#2413) Fix failure in time encoding for pandas < 0.21.1 (pydata#2630) Fix multiindex selection (pydata#2621) Close files when CachingFileManager is garbage collected (pydata#2595) added some logic to deal with rasterio objects in addition to filepaths (pydata#2589) Get 0d slices of ndarrays directly from indexing (pydata#2625) FIX Don't raise a deprecation warning for xarray.ufuncs.{angle,iscomplex} (pydata#2615) CF: also decode time bounds when available (pydata#2571)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It turns out there was a remaining bug in cftime (Unidata/cftime#106) that impacted the results of the
dayofwkanddayofyrattributes of cftime objects generated by theirreplacemethod, which we use when parsing dates from strings, and in some offset arithmetic.A workaround is to add a
dayofwk=-1argument to eachreplacecall where thedayofwkordayofyrwould be expected to change. I've fixed this bug upstream in cftime (Unidata/cftime#108), but it will only be available in a future version. Would it be appropriate to use this workaround in xarray?This would fix this doc page for instance: