Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1814aa8

Browse files
committed
DOC: Mention copy=True for __array__ in migration guide [skip azp] [skip cirrus] [skip actions]
1 parent e1bf1d6 commit 1814aa8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/source/numpy_2_0_migration_guide.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,4 +422,6 @@ The :ref:`copy keyword behavior changes <copy-keyword-changes-2.0>` in
422422
of how to do so.
423423
3. For any ``__array__`` method on a non-NumPy array-like object, a
424424
``copy=None`` keyword can be added to the signature - this will work with
425-
older NumPy versions as well.
425+
older NumPy versions as well. If ``copy`` keyword is considered in
426+
the ``__array__`` method implementation, then for ``copy=True`` always
427+
return a new copy.

0 commit comments

Comments
 (0)