numpy.ma.nonzero()

numpy.ma.nonzero(self) = Return the indices of unmasked elements that are not zero. Returns a tuple of arrays, one for each dimension, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values can be obtained with: a[a.nonzero()] To group the indices by element, rather than dimension, use instead: np.transpose(a.nonzero()) The result of this is always a 2d array, with a row for each non-zero element. Parameters: None Returns: tuple_of_arrays

Random sampling (numpy.random)

Simple random data rand(d0, d1, ..., dn) Random values in a given shape. randn(d0, d1, ..., dn) Return a sample (or samples) from the ?standard normal? distribution. randint(low[, high, size, dtype]) Return random integers from low (inclusive) to high (exclusive). random_integers(low[, high, size]) Random integers of type np.int between low and high, inclusive. random_sample([size]) Return random floats in the half-open interval [0.0, 1.0). random([size]) Return random floats in the hal

numpy.ma.shape()

numpy.ma.shape(obj) [source] Return the shape of an array. Parameters: a : array_like Input array. Returns: shape : tuple of ints The elements of the shape tuple give the lengths of the corresponding array dimensions. See also alen ndarray.shape Equivalent array method. Examples >>> np.shape(np.eye(3)) (3, 3) >>> np.shape([[1, 2]]) (1, 2) >>> np.shape([0]) (1,) >>> np.shape(0) () >>> a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'),

Hermite.degree()

Hermite.degree() [source] The degree of the series. New in version 1.5.0. Returns: degree : int Degree of the series, one less than the number of coefficients.

chararray.reshape()

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

MaskedArray.__ior__

MaskedArray.__ior__ x.__ior__(y) <==> x|=y

numpy.arctan2()

numpy.arctan2(x1, x2[, out]) = Element-wise arc tangent of x1/x2 choosing the quadrant correctly. The quadrant (i.e., branch) is chosen so that arctan2(x1, x2) is the signed angle in radians between the ray ending at the origin and passing through the point (1,0), and the ray ending at the origin and passing through the point (x2, x1). (Note the role reversal: the ?y-coordinate? is the first function parameter, the ?x-coordinate? is the second.) By IEEE convention, this function is defined

Using the Convenience Classes

The convenience classes provided by the polynomial package are: Name Provides Polynomial Power series Chebyshev Chebyshev series Legendre Legendre series Laguerre Laguerre series Hermite Hermite series HermiteE HermiteE series The series in this context are finite sums of the corresponding polynomial basis functions multiplied by coefficients. For instance, a power series looks like and has coefficients . The Chebyshev series with the same coefficients looks like and more generally

numpy.append()

numpy.append(arr, values, axis=None) [source] Append values to the end of an array. Parameters: arr : array_like Values are appended to a copy of this array. values : array_like These values are appended to a copy of arr. It must be of the correct shape (the same shape as arr, excluding axis). If axis is not specified, values can be any shape and will be flattened before use. axis : int, optional The axis along which values are appended. If axis is not given, both arr and values are f

numpy.matlib.rand()

numpy.matlib.rand(*args) [source] Return a matrix of random values with given shape. Create a matrix of the given shape and propagate it with random samples from a uniform distribution over [0, 1). Parameters: *args : Arguments Shape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape. Returns: out : ndarray The matrix of random values with shape given by *args. See also randn, numpy.rando