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.base

ndarray.base Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4]) >>> x.base is None True Slicing creates a view, whose memory is shared with x: >>> y = x[2:] >>> y.base is x True

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],

numpy.testing.assert_raises()

numpy.testing.assert_raises(exception_class, callable, *args, **kwargs) [source] Fail unless an exception of class exception_class is thrown by callable when invoked with arguments args and keyword arguments kwargs. If a different type of exception is thrown, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. Alternatively, assert_raises can be used as a context manager: >>> from numpy.testing import assert_rai

MaskedArray.mean()

MaskedArray.mean(axis=None, dtype=None, out=None) [source] Returns the average of the array elements. Masked entries are ignored. The average is taken over the flattened array by default, otherwise over the specified axis. Refer to numpy.mean for the full documentation. Parameters: a : array_like Array containing numbers whose mean is desired. If a is not an array, a conversion is attempted. axis : int, optional Axis along which the means are computed. The default is to compute the mean

recarray.searchsorted()

recarray.searchsorted(v, side='left', sorter=None) Find indices where elements of v should be inserted in a to maintain order. For full documentation, see numpy.searchsorted See also numpy.searchsorted equivalent function

numpy.interp()

numpy.interp(x, xp, fp, left=None, right=None, period=None) [source] One-dimensional linear interpolation. Returns the one-dimensional piecewise linear interpolant to a function with given values at discrete data-points. Parameters: x : array_like The x-coordinates of the interpolated values. xp : 1-D sequence of floats The x-coordinates of the data points, must be increasing if argument period is not specified. Otherwise, xp is internally sorted after normalizing the periodic boundarie

numpy.polynomial.hermite.hermtrim()

numpy.polynomial.hermite.hermtrim(c, tol=0) [source] Remove ?small? ?trailing? coefficients from a polynomial. ?Small? means ?small in absolute value? and is controlled by the parameter tol; ?trailing? means highest order coefficient(s), e.g., in [0, 1, 1, 0, 0] (which represents 0 + x + x**2 + 0*x**3 + 0*x**4) both the 3-rd and 4-th order coefficients would be ?trimmed.? Parameters: c : array_like 1-d array of coefficients, ordered from lowest order to highest. tol : number, optional T

numpy.ma.squeeze()

numpy.ma.squeeze(a, axis=None) [source] Remove single-dimensional entries from the shape of an array. Parameters: a : array_like Input data. axis : None or int or tuple of ints, optional New in version 1.7.0. Selects a subset of the single-dimensional entries in the shape. If an axis is selected with shape entry greater than one, an error is raised. Returns: squeezed : ndarray The input array, but with all or a subset of the dimensions of length 1 removed. This is always a itself

HermiteE.has_samedomain()

HermiteE.has_samedomain(other) [source] Check if domains match. New in version 1.6.0. Parameters: other : class instance The other class must have the domain attribute. Returns: bool : boolean True if the domains are the same, False otherwise.