This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / _CopyMode

EnumType

numpy:_CopyMode

source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/__init__.py :66

Signature

def   _CopyMode ( * values )

Summary

An enumeration for the copy modes supported by numpy.copy() and numpy.array(). The following three modes are supported,

Extended Summary

  • ALWAYS: This means that a deep copy of the input

    array will always be taken.

  • IF_NEEDED: This means that a deep copy of the input

    array will be taken only if necessary.

  • NEVER: This means that the deep copy will never be taken.

    If a copy cannot be avoided then a ValueError will be raised.

Note that the buffer-protocol could in theory do copies. NumPy currently assumes an object exporting the buffer protocol will never do this.

Aliases

  • numpy._CopyMode