Skip to content

DOC: fix up release note #22227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/release/upcoming_changes/21995.compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ always exactly matches the dtype provided by the caller.
In some cases this change means that a *view* rather than the
input array is returned.
The following is an example for this on 64bit Linux where ``long``
and ``longlong`` are the same precision::
and ``longlong`` are the same precision but different ``dtypes``::

>>> arr = np.array([1, 2, 3], dtype="long")
>>> new_dtype = np.dtype("longlong")
>>> new = np.asarray(arr, dtype=new_dtype)
>>> new.dtype is dtype
>>> new.dtype is new_dtype
True
>>> new is arr
False

Before the change, the ``dtype`` did not match because ``new is arr``
was true.
was ``True``.