Skip to content

ENH: pass copy=True to __array__ #26208

@ngoldbaum

Description

@ngoldbaum

This is followup for #25941.

As of NumPy 2.0, __array__ implementations will never receive copy=True when NumPy calls the function. As a followup for adding the copy keyword, we need to first prevent numpy from making a copy before calling __array__ and pass copy=True to __array__ implementations. We also need to update the documentation to emphasize that the library is responsible for making a copy, or if making a copy is impossible, raising an error.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions