Miscellaneous routines

Buffer objects getbuffer(obj [,offset[, size]]) Create a buffer object from the given object referencing a slice of length size starting at offset. newbuffer(size) Return a new uninitialized buffer object. Performance tuning alterdot() Change dot, vdot, and inner to use accelerated BLAS functions. restoredot() Restore dot, vdot, and innerproduct to the default non-BLAS implementations. setbufsize(size) Set the size of the buffer used in ufuncs. getbufsize() Return the size of the b

numpy.nditer

class numpy.nditer [source] Efficient multi-dimensional iterator object to iterate over arrays. To get started using this object, see the introductory guide to array iteration. Parameters: op : ndarray or sequence of array_like The array(s) to iterate over. flags : sequence of str, optional Flags to control the behavior of the iterator. ?buffered? enables buffering when required. ?c_index? causes a C-order index to be tracked. ?f_index? causes a Fortran-order index to be tracked. ?mult

numpy.matmul()

numpy.matmul(a, b, out=None) Matrix product of two arrays. The behavior depends on the arguments in the following way. If both arguments are 2-D they are multiplied like conventional matrices. If either argument is N-D, N > 2, it is treated as a stack of matrices residing in the last two indexes and broadcast accordingly. If the first argument is 1-D, it is promoted to a matrix by prepending a 1 to its dimensions. After matrix multiplication the prepended 1 is removed. If the second argu

RandomState.random_integers()

RandomState.random_integers(low, high=None, size=None) Random integers of type np.int between low and high, inclusive. Return random integers of type np.int from the ?discrete uniform? distribution in the closed interval [low, high]. If high is None (the default), then results are from [1, low]. The np.int type translates to the C long type used by Python 2 for ?short? integers and its precision is platform dependent. This function has been deprecated. Use randint instead. Deprecated since

Indexing routines

See also Indexing Generating index arrays c_ Translates slice objects to concatenation along the second axis. r_ Translates slice objects to concatenation along the first axis. s_ A nicer way to build up index tuples for arrays. nonzero(a) Return the indices of the elements that are non-zero. where(condition, [x, y]) Return elements, either from x or y, depending on condition. indices(dimensions[, dtype]) Return an array representing the indices of a grid. ix_(*args) Construct an open m

ndarray.__hex__()

ndarray.__hex__() <==> hex(x)

generic.tofile()

generic.tofile() 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.testing.decorators.setastest()

numpy.testing.decorators.setastest(tf=True) [source] Signals to nose that this function is or is not a test. Parameters: tf : bool If True, specifies that the decorated callable is a test. If False, specifies that the decorated callable is not a test. Default is True. Notes This decorator can?t use the nose namespace, because it can be called from a non-test module. See also istest and nottest in nose.tools. Examples setastest can be used in the following way: from numpy.testing.decorat

Legendre Module (numpy.polynomial.legendre)

New in version 1.6.0. This module provides a number of objects (mostly functions) useful for dealing with Legendre series, including a Legendre 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). Legendre Class Legendre(coef[, domain, window]) A Legendre series class. Basics legval(x, c[, tensor]) Evaluate a Legendre series at point

MaskedArray.__rpow__()

MaskedArray.__rpow__(other) [source] Raise other to the power self, masking the potential NaNs/Infs