-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR] time type conversion to timedelta if timedelta64 is given (#660)
* make sure time diff type is timedelta: in case it was timedelta64 convert it, so following `.seconds` line could run without error * Update xcdat/bounds.py Co-authored-by: Stephen Po-Chedley <[email protected]> * proceed `pd.to_timedelta` only if diff type is `np.timedelta64` * Update `_create_time_bounds()` - Add comment about needing to convert dype=timedelta64[ns] to pandas timedelta object - Ignore C901 flake8 error * Add coverage for new code * Update tests/test_bounds.py --------- Co-authored-by: Stephen Po-Chedley <[email protected]> Co-authored-by: Tom Vo <[email protected]>
- Loading branch information
1 parent
9ad91a0
commit c653bf2
Showing
3 changed files
with
75 additions
and
5 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