class documentation

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

  • 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.

Method __bool__ Undocumented
Constant ALWAYS Undocumented
Constant IF_NEEDED Undocumented
Constant NEVER Undocumented
def __bool__(self): (source)

Undocumented

Undocumented

Value
True
IF_NEEDED: bool = (source)

Undocumented

Value
False

Undocumented

Value
2