numpy.ma.transpose()

numpy.ma.transpose(a, axes=None) [source] Permute the dimensions of an array. This function is exactly equivalent to numpy.transpose. See also numpy.transpose Equivalent function in top-level NumPy module. Examples >>> import numpy.ma as ma >>> x = ma.arange(4).reshape((2,2)) >>> x[1, 1] = ma.masked >>>> x masked_array(data = [[0 1] [2 --]], mask = [[False False] [False True]], fill_value = 999999) >>> ma.transpos

numpy.ma.trace()

numpy.ma.trace(self, offset=0, axis1=0, axis2=1, dtype=None, out=None) a.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None) = Return the sum along diagonals of the array. Refer to numpy.trace for full documentation. See also numpy.trace equivalent function

numpy.ma.swapaxes()

numpy.ma.swapaxes(self, *args, **params) a.swapaxes(axis1, axis2) = Return a view of the array with axis1 and axis2 interchanged. Refer to numpy.swapaxes for full documentation. See also numpy.swapaxes equivalent function

numpy.ma.sum()

numpy.ma.sum(self, axis=None, dtype=None, out=None) = Return the sum of the array elements over the given axis. Masked elements are set to 0 internally. Parameters: axis : {None, -1, int}, optional Axis along which the sum is computed. The default (axis = None) is to compute over the flattened array. dtype : {None, dtype}, optional Determines the type of the returned array and of the accumulator where the elements are summed. If dtype has the value None and the type of a is an integer

numpy.ma.std()

numpy.ma.std(self, axis=None, dtype=None, out=None, ddof=0) = 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 deviat

numpy.ma.squeeze()

numpy.ma.squeeze(a, axis=None) [source] Remove single-dimensional entries from the shape of an array. Parameters: a : array_like Input data. axis : None or int or tuple of ints, optional New in version 1.7.0. Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised. Returns: squeezed : ndarray The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself

numpy.ma.sort()

numpy.ma.sort(a, 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

numpy.ma.soften_mask()

numpy.ma.soften_mask(self) = 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

numpy.ma.size()

numpy.ma.size(obj, axis=None) [source] Return the number of elements along a given axis. Parameters: a : array_like Input data. axis : int, optional Axis along which the elements are counted. By default, give the total number of elements. Returns: element_count : int Number of elements along the specified axis. See also shape dimensions of array ndarray.shape dimensions of array ndarray.size number of elements in array Examples >>> a = np.array([[1,2,3],[4,5,6]])

numpy.ma.shape()

numpy.ma.shape(obj) [source] Return the shape of an array. Parameters: a : array_like Input array. Returns: shape : tuple of ints The elements of the shape tuple give the lengths of the corresponding array dimensions. See also alen ndarray.shape Equivalent array method. Examples >>> np.shape(np.eye(3)) (3, 3) >>> np.shape([[1, 2]]) (1, 2) >>> np.shape([0]) (1,) >>> np.shape(0) () >>> a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'),