-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16639 from anirudh2290/fix_timedelta_promotion_uint
BUG: Fix uint->timedelta promotion to raise TypeError
- Loading branch information
Showing
4 changed files
with
14 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
float->timedelta promotion will raise a TypeError | ||
------------------------------------------------- | ||
float->timedelta and uint64->timedelta promotion will raise a TypeError | ||
----------------------------------------------------------------------- | ||
Float and timedelta promotion consistently raises a TypeError. | ||
``np.promote_types("float32", "m8")`` aligns with | ||
``np.promote_types("m8", "float32")`` now and both raise a TypeError. | ||
Previously, ``np.promote_types("float32", "m8")`` returned ``"m8"`` which | ||
was considered a bug. | ||
|
||
Uint64 and timedelta promotion consistently raises a TypeError. | ||
``np.promote_types("uint64", "m8")`` aligns with | ||
``np.promote_types("m8", "uint64")`` now and both raise a TypeError. | ||
Previously, ``np.promote_types("uint64", "m8")`` returned ``"m8"`` which | ||
was considered a bug. |
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