numpy.ma.union1d#
- ma.union1d(ar1, ar2)[源代码]#
两个数组的并集.
输出总是一个掩码数组.更多细节请参见
numpy.union1d
.参见
numpy.union1d
ndarrays 的等效函数.
示例
>>> import numpy as np >>> ar1 = np.ma.array([1, 2, 3, 4]) >>> ar2 = np.ma.array([3, 4, 5, 6]) >>> np.ma.union1d(ar1, ar2) masked_array(data=[1, 2, 3, 4, 5, 6], mask=False, fill_value=999999)