summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastianb@nvidia.com>2022-12-03 12:37:38 +0100
committerSebastian Berg <sebastianb@nvidia.com>2022-12-03 12:37:38 +0100
commitd152fd84d42c2226122ce4b0687279e92c10e603 (patch)
treed1e64c99e70243e2f46019d63daaefdfb9540509
parent5d6c824160059c53cb6f6c614c27125f1c967cc8 (diff)
downloadnumpy-d152fd84d42c2226122ce4b0687279e92c10e603.tar.gz
DOC: Slightly expand ==/!= release note with examples
-rw-r--r--doc/release/upcoming_changes/22707.expired.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/release/upcoming_changes/22707.expired.rst b/doc/release/upcoming_changes/22707.expired.rst
index c172e62ad..bf1985b0e 100644
--- a/doc/release/upcoming_changes/22707.expired.rst
+++ b/doc/release/upcoming_changes/22707.expired.rst
@@ -2,9 +2,11 @@
------------------------------------
The ``==`` and ``!=`` operators on arrays now always:
-* raise errors that occur during comparisons
+* raise errors that occur during comparisons such as when the arrays
+ have incompatible shapes (``np.array([1, 2]) == np.array([1, 2, 3])``).
* return an array of all ``True`` or all ``False`` when values are
- fundamentally not comparable (e.g. have different dtypes).
+ fundamentally not comparable (e.g. have different dtypes). An example
+ is ``np.array(["a"]) == np.array([1])`.
For a long time these gave ``DeprecationWarning`` or ``FutureWarning``.
This mimics the Python behavior of returning ``False`` and ``True``