diff options
Diffstat (limited to 'doc/release/upcoming_changes/15685.new_feature.rst')
-rw-r--r-- | doc/release/upcoming_changes/15685.new_feature.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/15685.new_feature.rst b/doc/release/upcoming_changes/15685.new_feature.rst new file mode 100644 index 000000000..c4ed04e93 --- /dev/null +++ b/doc/release/upcoming_changes/15685.new_feature.rst @@ -0,0 +1,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. |