summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-17 19:07:51 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-18 11:12:20 -0600
commit037d2840ce0763bec31715e792fb30001bc80ed5 (patch)
treee1658ad924f74443591dd7d7f86590724bc41527
parentaaf115d89c591f0fa8149f1d6851589c79fa656a (diff)
downloadnumpy-037d2840ce0763bec31715e792fb30001bc80ed5.tar.gz
DOC: Mention that default casting for inplace operations has changed.
Mention in the compatibility section that default casting has changed from 'unsafe' to 'same_kind' for inplace operations. Closes #6498.
-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