matrix.flat

matrix.flat A 1-D iterator over the array. This is a numpy.flatiter instance, which acts similarly to, but is not a subclass of, Python?s built-in iterator object. See also flatten Return a copy of the array collapsed into one dimension. flatiter Examples >>> x = np.arange(1, 7).reshape(2, 3) >>> x array([[1, 2, 3], [4, 5, 6]]) >>> x.flat[3] 4 >>> x.T array([[1, 4], [2, 5], [3, 6]]) >>> x.T.flat[3] 5 >>> type(x.

matrix.getfield()

matrix.getfield(dtype, offset=0) Returns a field of the given array as a certain type. A field is a view of the array data with a given data-type. The values in the view are determined by the given type and the offset into the current array in bytes. The offset needs to be such that the view dtype fits in the array dtype; for example an array of dtype complex128 has 16-byte elements. If taking a view with a 32-bit integer (4 bytes), the offset needs to be between 0 and 12 bytes. Parameters:

recarray.setflags()

recarray.setflags(write=None, align=None, uic=None) Set array flags WRITEABLE, ALIGNED, and UPDATEIFCOPY, respectively. These Boolean-valued flags affect how numpy interprets the memory area used by a (see Notes below). The ALIGNED flag can only be set to True if the data is actually aligned according to the type. The UPDATEIFCOPY flag can never be set to True. The flag WRITEABLE can only be set to True if the array owns its own memory, or the ultimate owner of the memory exposes a writeabl

Hermite.truncate()

Hermite.truncate(size) [source] Truncate series to length size. Reduce the series to length size by discarding the high degree terms. The value of size must be a positive integer. This can be useful in least squares where the coefficients of the high degree terms may be very small. Parameters: size : positive int The series is reduced to length size by discarding the high degree terms. The value of size must be a positive integer. Returns: new_series : series New instance of series wi

Polynomial.has_samecoef()

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

numpy.floor_divide()

numpy.floor_divide(x1, x2[, out]) = Return the largest integer smaller or equal to the division of the inputs. It is equivalent to the Python // operator and pairs with the Python % (remainder), function so that b = a % b + b * (a // b) up to roundoff. Parameters: x1 : array_like Numerator. x2 : array_like Denominator. Returns: y : ndarray y = floor(x1/x2) See also remainder Remainder complementary to floor_divide. divide Standard division. floor Round a number to the n

numpy.ma.var()

numpy.ma.var(self, axis=None, dtype=None, out=None, ddof=0) = Compute the variance along the specified axis. Returns the variance of the array elements, a measure of the spread of a distribution. The variance is computed for the flattened array by default, otherwise over the specified axis. Parameters: a : array_like Array containing numbers whose variance is desired. If a is not an array, a conversion is attempted. axis : None or int or tuple of ints, optional Axis or axes along which

numpy.sort()

numpy.sort(a, axis=-1, kind='quicksort', order=None) [source] Return a sorted copy of an array. Parameters: a : array_like Array to be sorted. axis : int or None, optional Axis along which to sort. If None, the array is flattened before sorting. The default is -1, which sorts along the last axis. kind : {?quicksort?, ?mergesort?, ?heapsort?}, optional Sorting algorithm. Default is ?quicksort?. order : str or list of str, optional When a is an array with fields defined, this argument

MaskedArray.clip()

MaskedArray.clip(min=None, max=None, out=None) [source] Return an array whose values are limited to [min, max]. One of max or min must be given. Refer to numpy.clip for full documentation. See also numpy.clip equivalent function

numpy.isinf()

numpy.isinf(x[, out]) = Test element-wise for positive or negative infinity. Returns a boolean array of the same shape as x, True where x == +/-inf, otherwise False. Parameters: x : array_like Input values out : array_like, optional An array with the same shape as x to store the result. Returns: y : bool (scalar) or boolean ndarray For scalar input, the result is a new boolean with value True if the input is positive or negative infinity; otherwise the value is False. For array inp