numpy.ma.column_stack()

numpy.ma.column_stack(tup) = Stack 1-D arrays as columns into a 2-D array. Take a sequence of 1-D arrays and stack them as columns to make a single 2-D array. 2-D arrays are stacked as-is, just like with hstack. 1-D arrays are turned into 2-D columns first. Parameters: tup : sequence of 1-D or 2-D arrays. Arrays to stack. All of them must have the same first dimension. Returns: stacked : 2-D array The array formed by stacking the given arrays. Notes The function is applied to both

numpy.ma.clump_unmasked()

numpy.ma.clump_unmasked(a) [source] Return list of slices corresponding to the unmasked clumps of a 1-D array. (A ?clump? is defined as a contiguous region of the array). Parameters: a : ndarray A one-dimensional masked array. Returns: slices : list of slice The list of slices, one for each continuous region of unmasked elements in a. See also flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges, notmasked_contiguous, clump_masked Notes New in version 1.4.0. Examples &

numpy.ma.clump_masked()

numpy.ma.clump_masked(a) [source] Returns a list of slices corresponding to the masked clumps of a 1-D array. (A ?clump? is defined as a contiguous region of the array). Parameters: a : ndarray A one-dimensional masked array. Returns: slices : list of slice The list of slices, one for each continuous region of masked elements in a. See also flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges, notmasked_contiguous, clump_unmasked Notes New in version 1.4.0. Examples &g

numpy.ma.clip()

numpy.ma.clip(a, a_min, a_max, out=None) [source] Clip (limit) the values in an array. Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become 1. Parameters: a : array_like Array containing elements to clip. a_min : scalar or array_like Minimum value. a_max : scalar or array_like Maximum value. If a_min or a_max are array_like, then they will be

numpy.ma.choose()

numpy.ma.choose(indices, choices, out=None, mode='raise') [source] Use an index array to construct a new array from a set of choices. Given an array of integers and a set of n choice arrays, this method will create a new array that merges each of the choice arrays. Where a value in a is i, the new array will have the value that choices[i] contains in the same place. Parameters: a : ndarray of ints This array must contain integers in [0, n-1], where n is the number of choices. choices : s

numpy.ma.average()

numpy.ma.average(a, axis=None, weights=None, returned=False) [source] Return the weighted average of array over the given axis. Parameters: a : array_like Data to be averaged. Masked entries are not taken into account in the computation. axis : int, optional Axis along which the average is computed. The default is to compute the average of the flattened array. weights : array_like, optional The importance that each element has in the computation of the average. The weights array can e

numpy.ma.atleast_3d()

numpy.ma.atleast_3d(*arys) = View inputs as arrays with at least three dimensions. Parameters: arys1, arys2, ... : array_like One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have three or more dimensions are preserved. Returns: res1, res2, ... : ndarray An array, or tuple of arrays, each with a.ndim >= 3. Copies are avoided where possible, and views with three or more dimensions are returned. For example, a 1-D array of shape (N,) be

numpy.ma.atleast_2d()

numpy.ma.atleast_2d(*arys) = View inputs as arrays with at least two dimensions. Parameters: arys1, arys2, ... : array_like One or more array-like sequences. Non-array inputs are converted to arrays. Arrays that already have two or more dimensions are preserved. Returns: res, res2, ... : ndarray An array, or tuple of arrays, each with a.ndim >= 2. Copies are avoided where possible, and views with two or more dimensions are returned. Notes The function is applied to both the _dat

numpy.ma.atleast_1d()

numpy.ma.atleast_1d(*arys) = Convert inputs to arrays with at least one dimension. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. Parameters: arys1, arys2, ... : array_like One or more input arrays. Returns: ret : ndarray An array, or sequence of arrays, each with a.ndim >= 1. Copies are made only if necessary. Notes The function is applied to both the _data and the _mask, if any. Examples >>> np.atleast_1d(1.0) arr

numpy.ma.asarray()

numpy.ma.asarray(a, dtype=None, order=None) [source] Convert the input to a masked array of the given data-type. No copy is performed if the input is already an ndarray. If a is a subclass of MaskedArray, a base class MaskedArray is returned. Parameters: a : array_like Input data, in any form that can be converted to a masked array. This includes lists, lists of tuples, tuples, tuples of tuples, tuples of lists, ndarrays and masked arrays. dtype : dtype, optional By default, the data-ty