diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-10-15 22:56:14 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-10-16 09:31:42 +0100 |
commit | 30b2b587d0b33d53cab72b11cb8da5378f277a30 (patch) | |
tree | 0830cc3791caed20397a1686f30a06acd2711623 /doc/release | |
parent | dc20ec8c857bc1f1b717b56f3a5c64dbf31f16ac (diff) | |
download | numpy-30b2b587d0b33d53cab72b11cb8da5378f277a30.tar.gz |
API: Forbid Q<->m safe casting
That is, uint64 <-> timedelta64.
Allowing this casting was weird, because Q<->q is forbidden, yet q and m are both int64.
This fixes gh-12927
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/upcoming_changes/14718.compatibility.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/14718.compatibility.rst b/doc/release/upcoming_changes/14718.compatibility.rst new file mode 100644 index 000000000..a42a2b388 --- /dev/null +++ b/doc/release/upcoming_changes/14718.compatibility.rst @@ -0,0 +1,7 @@ +``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False`` +--------------------------------------------------------------------------- +Previously this was ``True`` - however, this was inconsistent with ``uint64`` +not being safely castable to ``int64``, and resulting in strange type +resolution. + +If this impacts your code, cast ``uint64`` to ``int64`` first. |