MaskedArray.std()

MaskedArray.std(axis=None, dtype=None, out=None, ddof=0) [source] Compute the standard deviation along the specified axis. Returns the standard deviation, a measure of the spread of a distribution, of the array elements. The standard deviation is computed for the flattened array by default, otherwise over the specified axis. Parameters: a : array_like Calculate the standard deviation of these values. axis : None or int or tuple of ints, optional Axis or axes along which the standard dev

MaskedArray.squeeze()

MaskedArray.squeeze(axis=None) [source] Remove single-dimensional entries from the shape of a. Refer to numpy.squeeze for full documentation. See also numpy.squeeze equivalent function

MaskedArray.sort()

MaskedArray.sort(axis=-1, kind='quicksort', order=None, endwith=True, fill_value=None) [source] Sort the array, in-place Parameters: a : array_like Array to be sorted. axis : int, optional Axis along which to sort. If None, the array is flattened before sorting. The default is -1, which sorts along the last axis. kind : {?quicksort?, ?mergesort?, ?heapsort?}, optional Sorting algorithm. Default is ?quicksort?. order : list, optional When a is a structured array, this argument specif

MaskedArray.soften_mask()

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

MaskedArray.size

MaskedArray.size Number of elements in the array. Equivalent to np.prod(a.shape), i.e., the product of the array?s dimensions. Examples >>> x = np.zeros((3, 5, 2), dtype=np.complex128) >>> x.size 30 >>> np.prod(x.shape) 30

MaskedArray.shrink_mask()

MaskedArray.shrink_mask() [source] Reduce a mask to nomask when possible. Parameters: None Returns: None Examples >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False], [False, False]], dtype=bool) >>> x.shrink_mask() >>> x.mask False

MaskedArray.shape

MaskedArray.shape Tuple of array dimensions. Notes May be used to ?reshape? the array, as long as this would not require a change in the total number of elements Examples >>> x = np.array([1, 2, 3, 4]) >>> x.shape (4,) >>> y = np.zeros((2, 3, 4)) >>> y.shape (2, 3, 4) >>> y.shape = (3, 8) >>> y array([[ 0., 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0., 0., 0.]

MaskedArray.set_fill_value()

MaskedArray.set_fill_value(value=None) [source] Set the filling value of the masked array. Parameters: value : scalar, optional The new filling value. Default is None, in which case a default based on the data type is used. See also ma.set_fill_value Equivalent function. Examples >>> x = np.ma.array([0, 1.], fill_value=-np.inf) >>> x.fill_value -inf >>> x.set_fill_value(np.pi) >>> x.fill_value 3.1415926535897931 Reset to default: >>> x.s

MaskedArray.searchsorted()

MaskedArray.searchsorted(v, side='left', sorter=None) Find indices where elements of v should be inserted in a to maintain order. For full documentation, see numpy.searchsorted See also numpy.searchsorted equivalent function

MaskedArray.round()

MaskedArray.round(decimals=0, out=None) [source] Return a with each element rounded to the given number of decimals. Refer to numpy.around for full documentation. See also numpy.around equivalent function