numpy.sctype2char()

numpy.sctype2char(sctype) [source] Return the string representation of a scalar dtype. Parameters: sctype : scalar dtype or object If a scalar dtype, the corresponding string character is returned. If an object, sctype2char tries to infer its scalar type and then return the corresponding string character. Returns: typechar : str The string character corresponding to the scalar type. Raises: ValueError If sctype is an object for which the type can not be inferred. See also obj2s

recarray.fill()

recarray.fill(value) Fill the array with a scalar value. Parameters: value : scalar All elements of a will be assigned this value. Examples >>> a = np.array([1, 2]) >>> a.fill(0) >>> a array([0, 0]) >>> a = np.empty(2) >>> a.fill(1) >>> a array([ 1., 1.])

numpy.polynomial.polynomial.polycompanion()

numpy.polynomial.polynomial.polycompanion(c) [source] Return the companion matrix of c. The companion matrix for power series cannot be made symmetric by scaling the basis, so this function differs from those for the orthogonal polynomials. Parameters: c : array_like 1-D array of polynomial coefficients ordered from low to high degree. Returns: mat : ndarray Companion matrix of dimensions (deg, deg). Notes New in version 1.7.0.

MaskedArray.round()

MaskedArray.round(decimals=0, out=None) [source] Return a with each element rounded to the given number of decimals. Refer to numpy.around for full documentation. See also numpy.around equivalent function

numpy.nanmean()

numpy.nanmean(a, axis=None, dtype=None, out=None, keepdims=False) [source] Compute the arithmetic mean along the specified axis, ignoring NaNs. Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. float64 intermediate and return values are used for integer inputs. For all-NaN slices, NaN is returned and a RuntimeWarning is raised. New in version 1.8.0. Parameters: a : array_like Array containing numbers w

generic.shape

generic.shape tuple of array dimensions

numpy.testing.decorate_methods()

numpy.testing.decorate_methods(cls, decorator, testmatch=None) [source] Apply a decorator to all methods in a class matching a regular expression. The given decorator is applied to all public methods of cls that are matched by the regular expression testmatch (testmatch.search(methodname)). Methods that are private, i.e. start with an underscore, are ignored. Parameters: cls : class Class whose methods to decorate. decorator : function Decorator to apply to methods testmatch : compiled

numpy.core.defchararray.encode()

numpy.core.defchararray.encode(a, encoding=None, errors=None) [source] Calls str.encode element-wise. The set of available codecs comes from the Python standard library, and may be extended at runtime. For more information, see the codecs module. Parameters: a : array_like of str or unicode encoding : str, optional The name of an encoding errors : str, optional Specifies how to handle encoding errors Returns: out : ndarray See also str.encode Notes The type of the result will depe

numpy.ptp()

numpy.ptp(a, axis=None, out=None) [source] Range of values (maximum - minimum) along an axis. The name of the function comes from the acronym for ?peak to peak?. Parameters: a : array_like Input values. axis : int, optional Axis along which to find the peaks. By default, flatten the array. out : array_like 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 of the output values will be cast if necess

numpy.logaddexp()

numpy.logaddexp(x1, x2[, out]) = Logarithm of the sum of exponentiations of the inputs. Calculates log(exp(x1) + exp(x2)). This function is useful in statistics where the calculated probabilities of events may be so small as to exceed the range of normal floating point numbers. In such cases the logarithm of the calculated probability is stored. This function allows adding probabilities stored in such a fashion. Parameters: x1, x2 : array_like Input values. Returns: result : ndarray