Polynomial Module (numpy.polynomial.polynomial)

New in version 1.4.0. This module provides a number of objects (mostly functions) useful for dealing with Polynomial series, including a Polynomial class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the docstring for its ?parent? sub-package, numpy.polynomial). Polynomial Class Polynomial(coef[, domain, window]) A power series class. Basics polyval(x, c[, tensor]) Evaluate a polynomial at poin

ndarray.__mul__

ndarray.__mul__ x.__mul__(y) <==> x*y

MaskedArray.dump()

MaskedArray.dump(file) Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load. Parameters: file : str A string naming the dump file.

record.resize()

record.resize() Not implemented (virtual attribute) Class generic exists solely to derive numpy scalars from, and possesses, albeit unimplemented, all the attributes of the ndarray class so as to provide a uniform API. See also The

numpy.random.dirichlet()

numpy.random.dirichlet(alpha, size=None) Draw samples from the Dirichlet distribution. Draw size samples of dimension k from a Dirichlet distribution. A Dirichlet-distributed random variable can be seen as a multivariate generalization of a Beta distribution. Dirichlet pdf is the conjugate prior of a multinomial in Bayesian inference. Parameters: alpha : array Parameter of the distribution (k dimension for sample of dimension k). size : int or tuple of ints, optional Output shape. If th

numpy.polynomial.hermite.hermx

numpy.polynomial.hermite.hermx = array([ 0. , 0.5])

chararray.copy()

chararray.copy(order='C') Return a copy of the array. Parameters: order : {?C?, ?F?, ?A?, ?K?}, optional Controls the memory layout of the copy. ?C? means C-order, ?F? means F-order, ?A? means ?F? if a is Fortran contiguous, ?C? otherwise. ?K? means match the layout of a as closely as possible. (Note that this function and :func:numpy.copy are very similar, but have different default values for their order= arguments.) See also numpy.copy, numpy.copyto Examples >>> x = np.arr

Elementary Function

There is a general need for looping over not only functions on scalars but also over functions on vectors (or arrays). This concept is realized in Numpy by generalizing the universal functions (ufuncs). In regular ufuncs, the elementary function is limited to element-by-element operations, whereas the generalized version (gufuncs) supports ?sub-array? by ?sub-array? operations. The Perl vector library PDL provides a similar functionality and its terms are re-used in the following. Each general

chararray.count()

chararray.count(sub, start=0, end=None) [source] Returns an array with the number of non-overlapping occurrences of substring sub in the range [start, end]. See also char.count

numpy.polynomial.laguerre.lagval()

numpy.polynomial.laguerre.lagval(x, c, tensor=True) [source] Evaluate a Laguerre series at points x. If c is of length n + 1, this function returns the value: The parameter x is converted to an array only if it is a tuple or a list, otherwise it is treated as a scalar. In either case, either x or its elements must support multiplication and addition both with themselves and with the elements of c. If c is a 1-D array, then p(x) will have the same shape as x. If c is multidimensional, the