diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2013-12-05 15:01:42 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2014-05-04 18:14:11 +0200 |
commit | ad0b9753c063cad065882eb8b6b80f8f99afc47f (patch) | |
tree | 68a2a10026851b1cc8a5be316b5a42f2a0008a03 /doc/release/1.9.0-notes.rst | |
parent | 9b8f6c72caea0c6f3fa08b304135239636e4f165 (diff) | |
download | numpy-ad0b9753c063cad065882eb8b6b80f8f99afc47f.tar.gz |
DOC: Add (object) equality changes and error raising to release notes
Diffstat (limited to 'doc/release/1.9.0-notes.rst')
-rw-r--r-- | doc/release/1.9.0-notes.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/release/1.9.0-notes.rst b/doc/release/1.9.0-notes.rst index 4b1e094ad..35c8c6d8e 100644 --- a/doc/release/1.9.0-notes.rst +++ b/doc/release/1.9.0-notes.rst @@ -352,6 +352,26 @@ considered an input error instead of returning the default. The ``rank`` function has been deprecated to avoid confusion with ``numpy.linalg.matrix_rank``. +Object array equality comparisons +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In the future object array comparisons both `==` and `np.equal` will not +make use of identity checks anymore. For example: + +>>> a = np.array([np.array([1, 2, 3]), 1]) +>>> b = np.array([np.array([1, 2, 3]), 1]) +>>> a == b + +will consistently return False (and in the future an error) even if the array +in `a` and `b` was the same object. + +The equality operator `==` will in the future raise errors like `np.equal` +if broadcasting or element comparisons, etc. fails. + +Comparison with `arr == None` will in the future do an elementwise comparison +instead of just returning False. Code should be using `arr is None`. + +All of these changes will give Deprecation- or FutureWarnings at this time. + C-API ~~~~~ |