numpy.ma.outerproduct()

numpy.ma.outerproduct(a, b) [source] Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [R51] is: [[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]] Parameters: a : (M,) array_like First input vector. Input is flattened if not already 1-dimensional. b : (N,) array_like Second input vector. Input is flattened if not already 1-dimensional. out : (M, N) ndarray, optional A loc

numpy.ma.outer()

numpy.ma.outer(a, b) [source] Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [R50] is: [[a0*b0 a0*b1 ... a0*bN ] [a1*b0 . [ ... . [aM*b0 aM*bN ]] Parameters: a : (M,) array_like First input vector. Input is flattened if not already 1-dimensional. b : (N,) array_like Second input vector. Input is flattened if not already 1-dimensional. out : (M, N) ndarray, optional A location w

numpy.ma.ones()

numpy.ma.ones(shape, dtype=None, order='C') = Return a new array of given shape and type, filled with ones. Parameters: shape : int or sequence of ints Shape of the new array, e.g., (2, 3) or 2. dtype : data-type, optional The desired data-type for the array, e.g., numpy.int8. Default is numpy.float64. order : {?C?, ?F?}, optional Whether to store multidimensional data in C- or Fortran-contiguous (row- or column-wise) order in memory. Returns: out : ndarray Array of ones with the

numpy.ma.notmasked_edges()

numpy.ma.notmasked_edges(a, axis=None) [source] Find the indices of the first and last unmasked values along an axis. If all values are masked, return None. Otherwise, return a list of two tuples, corresponding to the indices of the first and last unmasked values respectively. Parameters: a : array_like The input array. axis : int, optional Axis along which to perform the operation. If None (default), applies to a flattened version of the array. Returns: edges : ndarray or list An a

numpy.ma.nonzero()

numpy.ma.nonzero(self) = Return the indices of unmasked elements that are not zero. Returns a tuple of arrays, one for each dimension, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values can be obtained with: a[a.nonzero()] To group the indices by element, rather than dimension, use instead: np.transpose(a.nonzero()) The result of this is always a 2d array, with a row for each non-zero element. Parameters: None Returns: tuple_of_arrays

numpy.ma.notmasked_contiguous()

numpy.ma.notmasked_contiguous(a, axis=None) [source] Find contiguous unmasked data in a masked array along the given axis. Parameters: a : array_like The input array. axis : int, optional Axis along which to perform the operation. If None (default), applies to a flattened version of the array. Returns: endpoints : list A list of slices (start and end indexes) of unmasked indexes in the array. See also flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges, clump_masked, c

numpy.ma.min()

numpy.ma.min(obj, axis=None, out=None, fill_value=None) [source] Return the minimum along a given axis. Parameters: axis : {None, int}, optional Axis along which to operate. By default, axis is None and the flattened input is used. out : array_like, optional Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output. fill_value : {var}, optional Value used to fill in the masked values. If None, use the output of minimum_fi

numpy.ma.median()

numpy.ma.median(a, axis=None, out=None, overwrite_input=False) [source] Compute the median along the specified axis. Returns the median of the array elements. Parameters: a : array_like Input array or object that can be converted to an array. axis : int, optional Axis along which the medians are computed. The default (None) is to compute the median along a flattened version of the array. out : ndarray, optional Alternative output array in which to place the result. It must have the sa

numpy.ma.mr_

numpy.ma.mr_ = Translate slice objects to concatenation along the first axis. This is the masked array version of lib.index_tricks.RClass. See also lib.index_tricks.RClass Examples >>> np.ma.mr_[np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6])] array([1, 2, 3, 0, 0, 4, 5, 6])

numpy.ma.mean()

numpy.ma.mean(self, axis=None, dtype=None, out=None) = Returns the average of the array elements. Masked entries are ignored. The average is taken over the flattened array by default, otherwise over the specified axis. Refer to numpy.mean for the full documentation. Parameters: a : array_like Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. axis : int, optional Axis along which the means are computed. The default is to compute the mean of