numpy.ma.innerproduct()

numpy.ma.innerproduct(a, b) [source] Inner product of two arrays. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. Parameters: a, b : array_like If a and b are nonscalar, their last dimensions must match. Returns: out : ndarray out.shape = a.shape[:-1] + b.shape[:-1] Raises: ValueError If the last dimension of a and b has different size. See also tensordot Sum products over arbitrary axes.

numpy.ma.inner()

numpy.ma.inner(a, b) [source] Inner product of two arrays. Ordinary inner product of vectors for 1-D arrays (without complex conjugation), in higher dimensions a sum product over the last axes. Parameters: a, b : array_like If a and b are nonscalar, their last dimensions must match. Returns: out : ndarray out.shape = a.shape[:-1] + b.shape[:-1] Raises: ValueError If the last dimension of a and b has different size. See also tensordot Sum products over arbitrary axes. dot G

numpy.ma.identity()

numpy.ma.identity(n, dtype=None) = Return the identity array. The identity array is a square array with ones on the main diagonal. Parameters: n : int Number of rows (and columns) in n x n output. dtype : data-type, optional Data-type of the output. Defaults to float. Returns: out : ndarray n x n array with its main diagonal set to one, and all other elements 0. Examples >>> np.identity(3) array([[ 1., 0., 0.], [ 0., 1., 0.], [ 0., 0., 1.]])

numpy.ma.indices()

numpy.ma.indices(dimensions, dtype=) [source] Return an array representing the indices of a grid. Compute an array where the subarrays contain index values 0,1,... varying only along the corresponding axis. Parameters: dimensions : sequence of ints The shape of the grid. dtype : dtype, optional Data type of the result. Returns: grid : ndarray The array of grid indices, grid.shape = (len(dimensions),) + tuple(dimensions). See also mgrid, meshgrid Notes The output shape is obtaine

numpy.ma.hsplit()

numpy.ma.hsplit(ary, indices_or_sections) = Split an array into multiple sub-arrays horizontally (column-wise). Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension. See also split Split an array into multiple sub-arrays of equal size. Notes The function is applied to both the _data and the _mask, if any. Examples >>> x = np.arange(16.0).reshape(4, 4) >>>

numpy.ma.hstack()

numpy.ma.hstack(tup) = Stack arrays in sequence horizontally (column wise). Take a sequence of arrays and stack them horizontally to make a single array. Rebuild arrays divided by hsplit. Parameters: tup : sequence of ndarrays All arrays must have the same shape along all but the second axis. Returns: stacked : ndarray The array formed by stacking the given arrays. See also stack Join a sequence of arrays along a new axis. vstack Stack arrays in sequence vertically (row wise

numpy.ma.getmaskarray()

numpy.ma.getmaskarray(arr) [source] Return the mask of a masked array, or full boolean array of False. Return the mask of arr as an ndarray if arr is a MaskedArray and the mask is not nomask, else return a full boolean array of False of the same shape as arr. Parameters: arr : array_like Input MaskedArray for which the mask is required. See also getmask Return the mask of a masked array, or nomask. getdata Return the data of a masked array as an ndarray. Examples >>> im

numpy.ma.harden_mask()

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

numpy.ma.fromfunction()

numpy.ma.fromfunction(function, shape, **kwargs) = Construct an array by executing a function over each coordinate. The resulting array therefore has a value fn(x, y, z) at coordinate (x, y, z). Parameters: function : callable The function is called with N parameters, where N is the rank of shape. Each parameter represents the coordinates of the array varying along a specific axis. For example, if shape were (2, 2), then the parameters in turn be (0, 0), (0, 1), (1, 0), (1, 1). shape :

numpy.ma.getmask()

numpy.ma.getmask(a) [source] Return the mask of a masked array, or nomask. Return the mask of a as an ndarray if a is a MaskedArray and the mask is not nomask, else return nomask. To guarantee a full array of booleans of the same shape as a, use getmaskarray. Parameters: a : array_like Input MaskedArray for which the mask is required. See also getdata Return the data of a masked array as an ndarray. getmaskarray Return the mask of a masked array, or full array of False. Examples