numpy.ma.set_fill_value()

numpy.ma.set_fill_value(a, fill_value) [source] Set the filling value of a, if a is a masked array. This function changes the fill value of the masked array a in place. If a is not a masked array, the function returns silently, without doing anything. Parameters: a : array_like Input array. fill_value : dtype Filling value. A consistency test is performed to make sure the value is compatible with the dtype of a. Returns: None Nothing returned by this function. See also maximum_

numpy.ma.row_stack()

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

numpy.ma.round()

numpy.ma.round(a, decimals=0, out=None) [source] Return a copy of a, rounded to ?decimals? places. When ?decimals? is negative, it specifies the number of positions to the left of the decimal point. The real and imaginary parts of complex numbers are rounded separately. Nothing is done if the array is not of float type and ?decimals? is greater than or equal to 0. Parameters: decimals : int Number of decimals to round to. May be negative. out : array_like Existing array to use for outpu

numpy.ma.resize()

numpy.ma.resize(x, new_shape) [source] Return a new masked array with the specified size and shape. This is the masked equivalent of the numpy.resize function. The new array is filled with repeated copies of x (in the order that the data are stored in memory). If x is masked, the new array will be masked, and the new mask will be a repetition of the old one. See also numpy.resize Equivalent function in the top level NumPy module. Examples >>> import numpy.ma as ma >>>

numpy.ma.reshape()

numpy.ma.reshape(a, new_shape, order='C') [source] Returns an array containing the same data with a new shape. Refer to MaskedArray.reshape for full documentation. See also MaskedArray.reshape equivalent function

numpy.ma.ravel()

numpy.ma.ravel(self, order='C') = Returns a 1D version of self, as a view. Parameters: order : {?C?, ?F?, ?A?, ?K?}, optional The elements of a are read using this index order. ?C? means to index the elements in C-like order, with the last axis index changing fastest, back to the first axis index changing slowest. ?F? means to index the elements in Fortran-like index order, with the first index changing fastest, and the last index changing slowest. Note that the ?C? and ?F? options take

numpy.ma.ptp()

numpy.ma.ptp(obj, axis=None, out=None, fill_value=None) [source] Return (maximum - minimum) along the the given dimension (i.e. peak-to-peak value). Parameters: axis : {None, int}, optional Axis along which to find the peaks. If None (default) the flattened array is used. out : {None, array_like}, optional Alternative output array in which to place the result. It must have the same shape and buffer length as the expected output but the type will be cast if necessary. fill_value : {var}

numpy.ma.prod()

numpy.ma.prod(self, axis=None, dtype=None, out=None) = Return the product of the array elements over the given axis. Masked elements are set to 1 internally for computation. Parameters: axis : {None, int}, optional Axis over which the product is taken. If None is used, then the product is over all the array elements. dtype : {None, dtype}, optional Determines the type of the returned array and of the accumulator where the elements are multiplied. If dtype has the value None and the typ

numpy.ma.power()

numpy.ma.power(a, b, third=None) [source] Returns element-wise base array raised to power from second array. This is the masked array version of numpy.power. For details see numpy.power. See also numpy.power Notes The out argument to numpy.power is not supported, third has to be None.

numpy.ma.polyfit()

numpy.ma.polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False) [source] Least squares polynomial fit. Fit a polynomial p(x) = p[0] * x**deg + ... + p[deg] of degree deg to points (x, y). Returns a vector of coefficients p that minimises the squared error. Parameters: x : array_like, shape (M,) x-coordinates of the M sample points (x[i], y[i]). y : array_like, shape (M,) or (M, K) y-coordinates of the sample points. Several data sets of sample points sharing the same x-coordinate