Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.ma.masked_array.copy

masked_array.copy(order='C')[source]

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’ ifa is Fortran contiguous,‘C’ otherwise. ‘K’ means match the layout ofa as closelyas possible. (Note that this function and :func:numpy.copy are verysimilar, 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)
>>>xarray([[0, 0, 0],       [0, 0, 0]])
>>>yarray([[1, 2, 3],       [4, 5, 6]])
>>>y.flags['C_CONTIGUOUS']True
  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp