On this page
numpy.ma.copy
numpy.ma.copy(self, *args, **params) a.copy(order='C') = <numpy.ma.core._frommethod object>-
Return a copy of the array.
Parameters: -
order : {‘C’, ‘F’, ‘A’, ‘K’}, optional -
Controls the memory layout of the copy. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if
ais Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout ofaas closely as possible. (Note that this function andnumpy.copyare very similar, but have different default values for their order= arguments.)
Examples
>>> x = np.array([[1,2,3],[4,5,6]], order='F')>>> y = x.copy()>>> x.fill(0)>>> x array([[0, 0, 0], [0, 0, 0]])>>> y array([[1, 2, 3], [4, 5, 6]])>>> y.flags['C_CONTIGUOUS'] True -
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.ma.copy.html