Skip to content
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

DOC: Mention copy=True for __array__ method in the migration guide. #26194

Merged
merged 1 commit into from Apr 2, 2024

Conversation

charris
Copy link
Member

@charris charris commented Apr 2, 2024

Backport of #26097.

Addresses #25941 (comment)

Hi @ngoldbaum,

With this PR, explicit copy argument is always passed to __array__.
NPY_ARRAY_ENSURECOPY check was missing from flags processing, to cover all supported values for copy:

* @param copy Specifies the copy behavior
* NOTE: For copy == -1 it passes `op.__array__(copy=None)`,
* for copy == 0, `op.__array__(copy=False)`, and
* for copy == 1, `op.__array__(copy=True).

[skip azp] [skip cirrus] [skip actions]

@charris charris added 04 - Documentation 08 - Backport Used to tag backport PRs labels Apr 2, 2024
@charris charris added this to the 2.0.0 release milestone Apr 2, 2024
@charris charris merged commit f98d7cb into numpy:maintenance/2.0.x Apr 2, 2024
5 checks passed
@charris charris deleted the backport-26097 branch April 2, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
04 - Documentation 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants