numpy.polynomial.polynomial.polypow()

numpy.polynomial.polynomial.polypow(c, pow, maxpower=None) [source] Raise a polynomial to a power. Returns the polynomial c raised to the power pow. The argument c is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series 1 + 2*x + 3*x**2. Parameters: c : array_like 1-D array of array of series coefficients ordered from low to high degree. pow : integer Power to which the series will be raised maxpower : integer, optional Maximum power allowed. This is mainly

Datetime Support Functions

Business Day Functions busdaycalendar A business day calendar object that efficiently stores information defining valid days for the busday family of functions. is_busday(dates[, weekmask, holidays, ...]) Calculates which of the given dates are valid days, and which are not. busday_offset(dates, offsets[, roll, ...]) First adjusts the date to fall on a valid day according to the roll rule, then applies offsets to the given dates counted in valid days. busday_count(begindates, enddates[, ..

numpy.radians()

numpy.radians(x[, out]) = Convert angles from degrees to radians. Parameters: x : array_like Input array in degrees. out : ndarray, optional Output array of same shape as x. Returns: y : ndarray The corresponding radian values. See also deg2rad equivalent function Examples Convert a degree array to radians >>> deg = np.arange(12.) * 30. >>> np.radians(deg) array([ 0. , 0.52359878, 1.04719755, 1.57079633, 2.0943951 , 2.61799388, 3.1415926

Array creation routines

See also Array creation Ones and zeros empty(shape[, dtype, order]) Return a new array of given shape and type, without initializing entries. empty_like(a[, dtype, order, subok]) Return a new array with the same shape and type as a given array. eye(N[, M, k, dtype]) Return a 2-D array with ones on the diagonal and zeros elsewhere. identity(n[, dtype]) Return the identity array. ones(shape[, dtype, order]) Return a new array of given shape and type, filled with ones. ones_like(a[, dtyp

MaskedArray.torecords()

MaskedArray.torecords() [source] Transforms a masked array into a flexible-type array. The flexible type array that is returned will have two fields: the _data field stores the _data part of the array. the _mask field stores the _mask part of the array. Parameters: None Returns: record : ndarray A new flexible-type ndarray with two fields: the first element containing a value, the second element containing the corresponding mask boolean. The returned record shape matches self.shape. N

Legendre.fit()

classmethod Legendre.fit(x, y, deg, domain=None, rcond=None, full=False, w=None, window=None) [source] Least squares fit to data. Return a series instance that is the least squares fit to the data y sampled at x. The domain of the returned instance can be specified and this will often result in a superior fit with less chance of ill conditioning. Parameters: x : array_like, shape (M,) x-coordinates of the M sample points (x[i], y[i]). y : array_like, shape (M,) or (M, K) y-coordinates o

numpy.ma.getmask()

numpy.ma.getmask(a) [source] Return the mask of a masked array, or nomask. Return the mask of a as an ndarray if a is a MaskedArray and the mask is not nomask, else return nomask. To guarantee a full array of booleans of the same shape as a, use getmaskarray. Parameters: a : array_like Input MaskedArray for which the mask is required. See also getdata Return the data of a masked array as an ndarray. getmaskarray Return the mask of a masked array, or full array of False. Examples

Hermite.has_sametype()

Hermite.has_sametype(other) [source] Check if types match. New in version 1.7.0. Parameters: other : object Class instance. Returns: bool : boolean True if other is same class as self

numpy.random.choice()

numpy.random.choice(a, size=None, replace=True, p=None) Generates a random sample from a given 1-D array New in version 1.7.0. Parameters: a : 1-D array-like or int If an ndarray, a random sample is generated from its elements. If an int, the random sample is generated as if a was np.arange(n) size : int or tuple of ints, optional Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned. replac

Polynomial.convert()

Polynomial.convert(domain=None, kind=None, window=None) [source] Convert series to a different kind and/or domain and/or window. Parameters: domain : array_like, optional The domain of the converted series. If the value is None, the default domain of kind is used. kind : class, optional The polynomial series type class to which the current instance should be converted. If kind is None, then the class of the current instance is used. window : array_like, optional The window of the conv