diff options
| author | Sebastian Berg <sebastianb@nvidia.com> | 2022-12-03 12:37:38 +0100 |
|---|---|---|
| committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-12-03 12:37:38 +0100 |
| commit | d152fd84d42c2226122ce4b0687279e92c10e603 (patch) | |
| tree | d1e64c99e70243e2f46019d63daaefdfb9540509 /doc | |
| parent | 5d6c824160059c53cb6f6c614c27125f1c967cc8 (diff) | |
| download | numpy-d152fd84d42c2226122ce4b0687279e92c10e603.tar.gz | |
DOC: Slightly expand ==/!= release note with examples
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/release/upcoming_changes/22707.expired.rst | 6 |
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`` |
