numpy.ma.ptp()

numpy.ma.ptp(obj, axis=None, out=None, fill_value=None) [source] Return (maximum - minimum) along the the given dimension (i.e. peak-to-peak value). Parameters: axis : {None, int}, optional Axis along which to find the peaks. If None (default) the flattened array is used. out : {None, array_like}, optional Alternative output array in which to place the result. It must have the same shape and buffer length as the expected output but the type will be cast if necessary. fill_value : {var}

numpy.ma.masked_equal()

numpy.ma.masked_equal(x, value, copy=True) [source] Mask an array where equal to a given value. This function is a shortcut to masked_where, with condition = (x == value). For floating point arrays, consider using masked_values(x, value). See also masked_where Mask where a condition is met. masked_values Mask using floating point equality. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_equal(a, 2) m

numpy.random.ranf()

numpy.random.ranf(size=None) Return random floats in the half-open interval [0.0, 1.0). Results are from the ?continuous uniform? distribution over the stated interval. To sample multiply the output of random_sample by (b-a) and add a: (b - a) * random_sample() + a Parameters: 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. Returns: out : float or n

numpy.ma.masked_object()

numpy.ma.masked_object(x, value, copy=True, shrink=True) [source] Mask the array x where the data are exactly equal to value. This function is similar to masked_values, but only suitable for object arrays: for floating point, use masked_values instead. Parameters: x : array_like Array to mask value : object Comparison value copy : {True, False}, optional Whether to return a copy of x. shrink : {True, False}, optional Whether to collapse a mask full of False to nomask Returns: res

recarray.setfield()

recarray.setfield(val, dtype, offset=0) Put a value into a specified place in a field defined by a data-type. Place val into a?s field defined by dtype and beginning offset bytes into the field. Parameters: val : object Value to be placed in field. dtype : dtype object Data-type of the field in which to place val. offset : int, optional The number of bytes into the field at which to place val. Returns: None See also getfield Examples >>> x = np.eye(3) >>> x.get

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.atleast_1d()

numpy.atleast_1d(*arys) [source] Convert inputs to arrays with at least one dimension. Scalar inputs are converted to 1-dimensional arrays, whilst higher-dimensional inputs are preserved. Parameters: arys1, arys2, ... : array_like One or more input arrays. Returns: ret : ndarray An array, or sequence of arrays, each with a.ndim >= 1. Copies are made only if necessary. See also atleast_2d, atleast_3d Examples >>> np.atleast_1d(1.0) array([ 1.]) >>> x = np.aran

Laguerre.cutdeg()

Laguerre.cutdeg(deg) [source] Truncate series to the given degree. Reduce the degree of the series to deg by discarding the high order terms. If deg is greater than the current degree a copy of the current series is returned. This can be useful in least squares where the coefficients of the high degree terms may be very small. New in version 1.5.0. Parameters: deg : non-negative int The series is reduced to degree deg by discarding the high order terms. The value of deg must be a non-ne

Hermite.cutdeg()

Hermite.cutdeg(deg) [source] Truncate series to the given degree. Reduce the degree of the series to deg by discarding the high order terms. If deg is greater than the current degree a copy of the current series is returned. This can be useful in least squares where the coefficients of the high degree terms may be very small. New in version 1.5.0. Parameters: deg : non-negative int The series is reduced to degree deg by discarding the high order terms. The value of deg must be a non-neg

HermiteE.cutdeg()

HermiteE.cutdeg(deg) [source] Truncate series to the given degree. Reduce the degree of the series to deg by discarding the high order terms. If deg is greater than the current degree a copy of the current series is returned. This can be useful in least squares where the coefficients of the high degree terms may be very small. New in version 1.5.0. Parameters: deg : non-negative int The series is reduced to degree deg by discarding the high order terms. The value of deg must be a non-ne