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.legendre.Legendre()

class numpy.polynomial.legendre.Legendre(coef, domain=None, window=None) [source] A Legendre series class. The Legendre class provides the standard Python numerical methods ?+?, ?-?, ?*?, ?//?, ?%?, ?divmod?, ?**?, and ?()? as well as the attributes and methods listed in the ABCPolyBase documentation. Parameters: coef : array_like Legendre coefficients in order of increasing degree, i.e., (1, 2, 3) gives 1*P_0(x) + 2*P_1(x) + 3*P_2(x). domain : (2,) array_like, optional Domain to use. T

ndarray.newbyteorder()

ndarray.newbyteorder(new_order='S') Return the array with the same data viewed with a different byte order. Equivalent to: arr.view(arr.dtype.newbytorder(new_order)) Changes are also made in all fields and sub-arrays of the array data type. Parameters: new_order : string, optional Byte order to force; a value from the byte order specifications below. new_order codes can be any of: ?S? - swap dtype from current to opposite endian {?<?, ?L?} - little endian {?>?, ?B?} - big endian {?

matrix.nbytes

matrix.nbytes Total bytes consumed by the elements of the array. Notes Does not include memory consumed by non-element attributes of the array object. Examples >>> x = np.zeros((3,5,2), dtype=np.complex128) >>> x.nbytes 480 >>> np.prod(x.shape) * x.itemsize 480

numpy.core.defchararray.replace()

numpy.core.defchararray.replace(a, old, new, count=None) [source] For each element in a, return a copy of the string with all occurrences of substring old replaced by new. Calls str.replace element-wise. Parameters: a : array-like of str or unicode old, new : str or unicode count : int, optional If the optional argument count is given, only the first count occurrences are replaced. Returns: out : ndarray Output array of str or unicode, depending on input type See also str.replace

numpy.tile()

numpy.tile(A, reps) [source] Construct an array by repeating A the number of times given by reps. If reps has length d, the result will have dimension of max(d, A.ndim). If A.ndim < d, A is promoted to be d-dimensional by prepending new axes. So a shape (3,) array is promoted to (1, 3) for 2-D replication, or shape (1, 1, 3) for 3-D replication. If this is not the desired behavior, promote A to d-dimensions manually before calling this function. If A.ndim > d, reps is promoted to A.nd

numpy.diagflat()

numpy.diagflat(v, k=0) [source] Create a two-dimensional array with the flattened input as a diagonal. Parameters: v : array_like Input data, which is flattened and set as the k-th diagonal of the output. k : int, optional Diagonal to set; 0, the default, corresponds to the ?main? diagonal, a positive (negative) k giving the number of the diagonal above (below) the main. Returns: out : ndarray The 2-D output array. See also diag MATLAB work-alike for 1-D and 2-D arrays. diag

numpy.roll()

numpy.roll(a, shift, axis=None) [source] Roll array elements along a given axis. Elements that roll beyond the last position are re-introduced at the first. Parameters: a : array_like Input array. shift : int The number of places by which elements are shifted. axis : int, optional The axis along which elements are shifted. By default, the array is flattened before shifting, after which the original shape is restored. Returns: res : ndarray Output array, with the same shape as a.

Polynomial.integ()

Polynomial.integ(m=1, k=[], lbnd=None) [source] Integrate. Return a series instance that is the definite integral of the current series. Parameters: m : non-negative int The number of integrations to perform. k : array_like Integration constants. The first constant is applied to the first integration, the second to the second, and so on. The list of values must less than or equal to m in length and any missing values are set to zero. lbnd : Scalar The lower bound of the definite integ

numpy.identity()

numpy.identity(n, dtype=None) [source] 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.]])