record.getfield()

record.getfield()

numpy.savez()

numpy.savez(file, *args, **kwds) [source] Save several arrays into a single file in uncompressed .npz format. If arguments are passed in with no keywords, the corresponding variable names, in the .npz file, are ?arr_0?, ?arr_1?, etc. If keyword arguments are given, the corresponding variable names, in the .npz file will match the keyword names. Parameters: file : str or file Either the file name (string) or an open file (file-like object) where the data will be saved. If file is a string,

numpy.ma.masked_less()

numpy.ma.masked_less(x, value, copy=True) [source] Mask an array where less than a given value. This function is a shortcut to masked_where, with condition = (x < value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_less(a, 2) masked_array(data = [-- -- 2 3], mask = [ True True False False], fill_value=999999)

numpy.polynomial.polynomial.polyroots()

numpy.polynomial.polynomial.polyroots(c) [source] Compute the roots of a polynomial. Return the roots (a.k.a. ?zeros?) of the polynomial Parameters: c : 1-D array_like 1-D array of polynomial coefficients. Returns: out : ndarray Array of the roots of the polynomial. If all the roots are real, then out is also real, otherwise it is complex. See also chebroots Notes The root estimates are obtained as the eigenvalues of the companion matrix, Roots far from the origin of the comple

numpy.random.geometric()

numpy.random.geometric(p, size=None) Draw samples from the geometric distribution. Bernoulli trials are experiments with one of two outcomes: success or failure (an example of such an experiment is flipping a coin). The geometric distribution models the number of trials that must be run in order to achieve success. It is therefore supported on the positive integers, k = 1, 2, .... The probability mass function of the geometric distribution is where p is the probability of success of an i

numpy.polynomial.legendre.legmulx()

numpy.polynomial.legendre.legmulx(c) [source] Multiply a Legendre series by x. Multiply the Legendre series c by x, where x is the independent variable. Parameters: c : array_like 1-D array of Legendre series coefficients ordered from low to high. Returns: out : ndarray Array representing the result of the multiplication. Notes The multiplication uses the recursion relationship for Legendre polynomials in the form

numpy.ma.expand_dims()

numpy.ma.expand_dims(x, axis) [source] Expand the shape of an array. Expands the shape of the array by including a new axis before the one specified by the axis parameter. This function behaves the same as numpy.expand_dims but preserves masked elements. See also numpy.expand_dims Equivalent function in top-level NumPy module. Examples >>> import numpy.ma as ma >>> x = ma.array([1, 2, 4]) >>> x[1] = ma.masked >>> x masked_array(data = [1 -- 4],

Poly1d

Basics poly1d(c_or_r[, r, variable]) A one-dimensional polynomial class. polyval(p, x) Evaluate a polynomial at specific values. poly(seq_of_zeros) Find the coefficients of a polynomial with the given sequence of roots. roots(p) Return the roots of a polynomial with coefficients given in p. Fitting polyfit(x, y, deg[, rcond, full, w, cov]) Least squares polynomial fit. Calculus polyder(p[, m]) Return the derivative of the specified order of a polynomial. polyint(p[, m, k]) Return a

ndarray.diagonal()

ndarray.diagonal(offset=0, axis1=0, axis2=1) Return specified diagonals. In NumPy 1.9 the returned array is a read-only view instead of a copy as in previous NumPy versions. In a future version the read-only restriction will be removed. Refer to numpy.diagonal for full documentation. See also numpy.diagonal equivalent function

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.]])