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.