ndarray.copy

ndarray.copy(self, order='C')

Return a coyp of the array, keeping the same context.

Parameters:
order : str

The memory layout of the copy. Currently, only c-contiguous memory layout is supported.

Examples

>>> x = np.ones((2, 3))
>>> y = x.copy()
>>> y
array([[ 1.,  1.,  1.],
       [ 1.,  1.,  1.]])