8000 ENH: add copy parameter for api.reshape function by bwalshe · Pull Request #23789 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: add copy parameter for api.reshape function #23789

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 8 commits into from
Jun 14, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
release note
  • Loading branch information
bwalshe committed Jun 3, 2023
commit 0d831f03fd46ff22d14889ad0146adf792439973
15 changes: 15 additions & 0 deletions doc/release/upcoming_changes/23789.new_feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Add copy parameter for api.reshape function.
--------------------------------------------

It is now possible to specify a copy parameter in the
Array API ``reshape`` function.

.. code-block:: python

>>> import numpy.array_api as nx
>>> array = nx.arange(10, dtype=nx.int64)
>>> other = nx.reshape(array, (2, 5), copy=True)
>>> array[:5] = -1
>>> print(other)
[[0 1 2 3 4]
[5 6 7 8 9]]
0