-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for CFTimeIndex in get_clean_interp_index (#3631)
* add support for CFTimeIndex in get_clean_interp_index * black * added test comparing cftime index with standard index * added comment * index in ns instead of days * pep8 * datetime_to_numeric: convert timedelta objects using np.timedelta64 type conversion. add overflow tests * added interp test * switched clean_interp_index resolution to us. Fixed interpolate_na and added support for CFTimeIndex. * Error message to explain overflow problem. * switched timedelta64 units from ms to us * reverted default user-visible resolution to ns. Converts to float, possibly lossy. * pep8 * black * special case for older numpy versions * black * added xfail for overflow error with numpy < 1.17 * changes following PR comments from spencerclark * bypass pandas to convert timedeltas to floats. avoids overflow errors. * black * removed numpy conversion. added docstrings. renamed tests. * pep8 * updated whats new * Update doc/whats-new.rst Co-Authored-By: Spencer Clark <[email protected]> * update interpolate_na docstrings * black * dt conflicts with accessor * replaced assert_equal by assert_allclose * Update xarray/core/duck_array_ops.py Co-Authored-By: Spencer Clark <[email protected]> * Update xarray/core/duck_array_ops.py Co-Authored-By: Spencer Clark <[email protected]> * renamed array to value in timedelta_to_numeric. Added tests * removed support for TimedeltaIndex in timedelta_to_numeric * added tests for np_timedelta64_to_float and pd_timedelta_to_float. renamed array to value for pd_timedelta_to_float. removed pd_timedeltaindex_to_float. * black * Fix flake8 error * black Co-authored-by: Spencer Clark <[email protected]>
- Loading branch information
1 parent
cc142f4
commit 8772355
Showing
9 changed files
with
352 additions
and
95 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.