MaskedArray.imag

MaskedArray.imag Imaginary part.

MaskedArray.ids()

MaskedArray.ids() [source] Return the addresses of the data and mask areas. Parameters: None Examples >>> x = np.ma.array([1, 2, 3], mask=[0, 1, 1]) >>> x.ids() (166670640, 166659832) If the array has no mask, the address of nomask is returned. This address is typically not close to the data in memory: >>> x = np.ma.array([1, 2, 3]) >>> x.ids() (166691080, 3083169284L)

MaskedArray.harden_mask()

MaskedArray.harden_mask() [source] Force the mask to hard. Whether the mask of a masked array is hard or soft is determined by its hardmask property. harden_mask sets hardmask to True. See also hardmask

MaskedArray.get_fill_value()

MaskedArray.get_fill_value() [source] Return the filling value of the masked array. Returns: fill_value : scalar The filling value. Examples >>> for dt in [np.int32, np.int64, np.float64, np.complex128]: ... np.ma.array([0, 1], dtype=dt).get_fill_value() ... 999999 999999 1e+20 (1e+20+0j) >>> x = np.ma.array([0, 1.], fill_value=-np.inf) >>> x.get_fill_value() -inf

MaskedArray.flatten()

MaskedArray.flatten(order='C') [source] Return a copy of the array collapsed into one dimension. Parameters: order : {?C?, ?F?, ?A?, ?K?}, optional ?C? means to flatten in row-major (C-style) order. ?F? means to flatten in column-major (Fortran- style) order. ?A? means to flatten in column-major order if a is Fortran contiguous in memory, row-major order otherwise. ?K? means to flatten a in the order the elements occur in memory. The default is ?C?. Returns: y : ndarray A copy of the

MaskedArray.flat

MaskedArray.flat Flat version of the array.

MaskedArray.flags

MaskedArray.flags Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access. Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by the user, via direct assignment to the attribute or dictionary entry, or by calling ndarray.setflags. The array flags cannot be set arbitrarily: UPD

MaskedArray.fill_value

MaskedArray.fill_value Filling value.

MaskedArray.filled()

MaskedArray.filled(fill_value=None) [source] Return a copy of self, with masked values filled with a given value. However, if there are no masked values to fill, self will be returned instead as an ndarray. Parameters: fill_value : scalar, optional The value to use for invalid entries (None by default). If None, the fill_value attribute of the array is used instead. Returns: filled_array : ndarray A copy of self with invalid entries replaced by fill_value (be it the function argument

MaskedArray.fill()

MaskedArray.fill(value) Fill the array with a scalar value. Parameters: value : scalar All elements of a will be assigned this value. Examples >>> a = np.array([1, 2]) >>> a.fill(0) >>> a array([0, 0]) >>> a = np.empty(2) >>> a.fill(1) >>> a array([ 1., 1.])