summaryrefslogtreecommitdiff
path: root/doc/release/upcoming_changes/15685.new_feature.rst
blob: c4ed04e93dbafa8b047f8dc1d65eb5cf631bdb5d (plain)
1
2
3
4
5
6
7
8
9
``subok`` option for `numpy.copy`
---------------------------------
A new kwarg, ``subok``, was added to `numpy.copy` to allow users to toggle the 
behavior of `numpy.copy` with respect to array subclasses. The default value
is ``False`` which is consistent with the behavior of `numpy.copy` for 
previous numpy versions. To create a copy that preserves an array subclass with
`numpy.copy`, call ``np.copy(arr, subok=True)``. This addition better documents
that the default behavior of `numpy.copy` differs from the 
`numpy.ndarray.copy` method which respects array subclasses by default.