MaskedArray.ravel()

MaskedArray.ravel(order='C') [source] 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 ta

numpy.polynomial.laguerre.lagvander()

numpy.polynomial.laguerre.lagvander(x, deg) [source] Pseudo-Vandermonde matrix of given degree. Returns the pseudo-Vandermonde matrix of degree deg and sample points x. The pseudo-Vandermonde matrix is defined by where 0 <= i <= deg. The leading indices of V index the elements of x and the last index is the degree of the Laguerre polynomial. If c is a 1-D array of coefficients of length n + 1 and V is the array V = lagvander(x, n), then np.dot(V, c) and lagval(x, c) are the same up

numpy.trim_zeros()

numpy.trim_zeros(filt, trim='fb') [source] Trim the leading and/or trailing zeros from a 1-D array or sequence. Parameters: filt : 1-D array or sequence Input array. trim : str, optional A string with ?f? representing trim from front and ?b? to trim from back. Default is ?fb?, trim zeros from both front and back of the array. Returns: trimmed : 1-D array or sequence The result of trimming the input. The input data type is preserved. Examples >>> a = np.array((0, 0, 0, 1,

numpy.ma.count()

numpy.ma.count(a, axis=None) [source] Count the non-masked elements of the array along the given axis. Parameters: axis : int, optional Axis along which to count the non-masked elements. If axis is None, all non-masked elements are counted. Returns: result : int or ndarray If axis is None, an integer count is returned. When axis is not None, an array with shape determined by the lengths of the remaining axes, is returned. See also count_masked Count masked elements in array or a

Hermite.trim()

Hermite.trim(tol=0) [source] Remove trailing coefficients Remove trailing coefficients until a coefficient is reached whose absolute value greater than tol or the beginning of the series is reached. If all the coefficients would be removed the series is set to [0]. A new series instance is returned with the new coefficients. The current instance remains unchanged. Parameters: tol : non-negative number. All trailing coefficients less than tol will be removed. Returns: new_series : serie

numpy.putmask()

numpy.putmask(a, mask, values) Changes elements of an array based on conditional and input values. Sets a.flat[n] = values[n] for each n where mask.flat[n]==True. If values is not the same size as a and mask then it will repeat. This gives behavior different from a[mask] = values. Parameters: a : array_like Target array. mask : array_like Boolean mask array. It has to be the same shape as a. values : array_like Values to put into a where mask is True. If values is smaller than a it wi

numpy.logical_or()

numpy.logical_or(x1, x2[, out]) = Compute the truth value of x1 OR x2 element-wise. Parameters: x1, x2 : array_like Logical OR is applied to the elements of x1 and x2. They have to be of the same shape. Returns: y : ndarray or bool Boolean result with the same shape as x1 and x2 of the logical OR operation on elements of x1 and x2. See also logical_and, logical_not, logical_xor, bitwise_or Examples >>> np.logical_or(True, False) True >>> np.logical_or([True, Fal

matrix.itemset()

matrix.itemset(*args) Insert scalar into an array (scalar is cast to array?s dtype, if possible) There must be at least 1 argument, and define the last argument as item. Then, a.itemset(*args) is equivalent to but faster than a[args] = item. The item should be a scalar value and args must select a single item in the array a. Parameters: *args : Arguments If one argument: a scalar, only used in case a is of size 1. If two arguments: the last argument is the value to be set and must be a sc

numpy.extract()

numpy.extract(condition, arr) [source] Return the elements of an array that satisfy some condition. This is equivalent to np.compress(ravel(condition), ravel(arr)). If condition is boolean np.extract is equivalent to arr[condition]. Note that place does the exact opposite of extract. Parameters: condition : array_like An array whose nonzero or True entries indicate the elements of arr to extract. arr : array_like Input array of the same size as condition. Returns: extract : ndarray

ndarray.__array__()

ndarray.__array__(|dtype) ? reference if type unchanged, copy otherwise. Returns either a new reference to self if dtype is not given or a new array of provided data type if dtype is different from the current dtype of the array.