.MaskedArray([1,2], mask=True) >>> a masked_array(data=[--, --],#Value is maskedmask=[ True, True], fill_value=999999, dtype=int64) >>> a.mask = False#Change not to mask values>>> a masked_array(data=[1, 2],#Original values are restoredmask=[False, False], fill_value...
numpy.MaskedArray.default_fill_value()函数用于返回参数对象的默认填充值。默认填充值取决于输入数组的数据类型或输入标量的类型。如果数据类型是 bool,那么缺省填充值是 True,对于 int 是 999999,对于 float 是 1.e20,对于 complex 是 1.e20+0.j,'?'对象为,字符串为“不适用”。 语法:numpy.ma.default_fil...
deftest_peak_with_mask(self):# Single value in column masked.latitude = iris.coords.DimCoord(np.arange(0,5,1), standard_name='latitude', units='degrees') cube = iris.cube.Cube(ma.array([1,4,2,3,2], dtype=np.float32), standard_name='air_temperature', units='kelvin') cube.add_...
deftest_peak_with_mask(self):# Single value in column masked.latitude = iris.coords.DimCoord(np.arange(0,5,1), standard_name='latitude', units='degrees') cube = iris.cube.Cube(ma.array([1,4,2,3,2], dtype=np.float32), standard_name='air_temperature', units='kelvin') cube.add_...