FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BUG: Allow unmodified use of isclose, allclose, etc. with timedelta by charris · Pull Request #18337 · numpy/numpy · GitHub

/ numpy Public

BUG: Allow unmodified use of isclose, allclose, etc. with timedelta - #18337

Merged
charris merged 1 commit into
numpy:maintenance/1.20.xfrom
charris:backport-18329
Feb 5, 2021
Merged

charris merged 1 commit into
numpy:maintenance/1.20.xfrom
charris:backport-18329

Conversation

charris commented Feb 5, 2021

Copy link
Copy Markdown
Member

Backport of #18329.

Disallowing timedelta64+float promotion (to timedelta64) in all cases
(previously it was assymetric and "half allowed") meant that isclose,
allclose, np.ma.allclose, and assert_arrays_almost_equal (which uses
isclose), would stop work for timedelta64. Hardcoding that timedelta64
is passed on unmodified retains the old behaviour.

It may make sense to deprecate or change this behaviour in the future,
but for the 1.20 release, the behaviour should be as much unmodified
as possible.

Closes gh-18286

Disallowing timedelta64+float promotion (to timedelta64) in all cases
(previously it was assymetric and "half allowed") meant that isclose,
allclose, np.ma.allclose, and assert_arrays_almost_equal (which uses
isclose), would stop work for timedelta64. Hardcoding that timedelta64
is passed on unmodified retains the old behaviour.

It may make sense to deprecate or change this behaviour in the future,
but for the 1.20 release, the behaviour should be as much unmodified
as possible.

Closes numpygh-18286
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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL