本文簡要介紹 python 語言中  numpy.ma.copy  的用法。
- 用法:- ma.copy(self, *args, **params) a.copy(order='C') = <numpy.ma.core._frommethod object>
- 返回數組的副本。 - order: {‘C’、‘F’、‘A’、‘K’},可選
- 控製副本的內存布局。 “C”表示C-order,“F”表示F-order,“A”表示“F”,如果a是 Fortran 連續的,否則為“C”。 ‘K’表示匹配布局a盡可能接近。 (請注意,此函數和numpy.copy非常相似,但它們的 order= 參數具有不同的默認值,並且此函數始終傳遞子類。) 
 
 - 參數:- 注意:- 此函數是創建數組副本的首選方法。函數 - numpy.copy類似,但默認使用順序‘K’,默認不傳遞子類。- 例子:- >>> 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
相關用法
- Python numpy ma.concatenate用法及代碼示例
- Python numpy ma.compress_rowcols用法及代碼示例
- Python numpy ma.count用法及代碼示例
- Python numpy ma.common_fill_value用法及代碼示例
- Python numpy ma.count_masked用法及代碼示例
- Python numpy ma.conjugate用法及代碼示例
- Python numpy ma.column_stack用法及代碼示例
- Python numpy ma.cumsum用法及代碼示例
- Python numpy ma.choose用法及代碼示例
- Python numpy ma.clump_unmasked用法及代碼示例
- Python numpy ma.clip用法及代碼示例
- Python numpy ma.clump_masked用法及代碼示例
- Python numpy ma.indices用法及代碼示例
- Python numpy ma.zeros用法及代碼示例
- Python numpy ma.diff用法及代碼示例
- Python numpy ma.mask_rowcols用法及代碼示例
- Python numpy ma.where用法及代碼示例
- Python numpy ma.zeros_like用法及代碼示例
- Python numpy ma.notmasked_contiguous用法及代碼示例
- Python numpy ma.apply_along_axis用法及代碼示例
- Python numpy ma.vstack用法及代碼示例
- Python numpy ma.atleast_3d用法及代碼示例
- Python numpy ma.fix_invalid用法及代碼示例
- Python numpy ma.mean用法及代碼示例
- Python numpy ma.argmax用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.ma.copy。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
