summaryrefslogtreecommitdiff
path: root/doc/release
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-10-15 22:56:14 +0100
committerEric Wieser <wieser.eric@gmail.com>2019-10-16 09:31:42 +0100
commit30b2b587d0b33d53cab72b11cb8da5378f277a30 (patch)
tree0830cc3791caed20397a1686f30a06acd2711623 /doc/release
parentdc20ec8c857bc1f1b717b56f3a5c64dbf31f16ac (diff)
downloadnumpy-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.rst7
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.