summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel J. Smith <njs@pobox.com>2015-10-18 19:58:03 +0000
committerNathaniel J. Smith <njs@pobox.com>2015-10-18 19:58:03 +0000
commit3ddaa592d855597ae8afe13b3848ac032e693295 (patch)
tree38ab3f7b85cbb34c428329487d80cbae99b96cc7
parent8cf83ee92aaba5a802799b752621f7c413cace34 (diff)
parent037d2840ce0763bec31715e792fb30001bc80ed5 (diff)
downloadnumpy-3ddaa592d855597ae8afe13b3848ac032e693295.tar.gz
Merge pull request #6499 from charris/update-1.10.0-notes
DOC: Mention that default casting for inplace operations has changed.
-rw-r--r--doc/release/1.10.0-notes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst
index 75530db4e..0341d2a6a 100644
--- a/doc/release/1.10.0-notes.rst
+++ b/doc/release/1.10.0-notes.rst
@@ -50,6 +50,16 @@ See below for more details on these changes.
Compatibility notes
===================
+Default casting rule change
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Default casting for inplace operations has changed to ``'same_kind'``. For
+instance, if n is an array of integers, and f is an array of floats, then
+``n += f`` will result in a ``TypeError``, whereas in previous Numpy
+versions the floats would be silently cast to ints. In the unlikely case
+that the example code is not an actual bug, it can be updated in a backward
+compatible way by rewriting it as ``np.add(n, f, out=n, casting='unsafe')``.
+The old ``'unsafe'`` default has been deprecated since Numpy 1.7.
+
numpy version string
~~~~~~~~~~~~~~~~~~~~
The numpy version string for development builds has been changed from