Version 1.0b1 API Documentation generated by Endo 2006-08-14
False_ = bool_(False)
True_ = bool_(True)
arange = multiarray.arange
array = multiarray.array
broadcast = multiarray.broadcast
can_cast = multiarray.can_cast
concatenate = multiarray.concatenate
dot = multiarray.dot
dtype = multiarray.dtype
empty = multiarray.empty
fastCopyAndTranspose = multiarray._fastCopyAndTranspose
flatiter = multiarray.flatiter
frombuffer = multiarray.frombuffer
fromfile = multiarray.fromfile
fromiter = multiarray.fromiter
fromstring = multiarray.fromstring
getbuffer = multiarray.getbuffer
inner = multiarray.inner
lexsort = multiarray.lexsort
little_endian = sys.byteorder== 'little'
ndarray = multiarray.ndarray
newaxis = None
newbuffer = multiarray.newbuffer
set_numeric_ops = multiarray.set_numeric_ops
set_string_function = multiarray.set_string_function
ufunc = type(sin)
where = multiarray.where
zeros = multiarray.zeros
allclose(a,b,rtol=1.e-5,atol=1.e-8) Returns true if all components of a and b are equal subject to given tolerances. The relative error rtol must be positive and << 1.0 The absolute error atol comes into play for those elements of y that are very small or zero; it says how small x must be also.
Return a 2-d array of shape N x a.ndim where each row is a sequence of indices into a. This sequence must be converted to a tuple in order to be used to index into a.
Returns a as an array, but will pass subclasses through.
Returns a as an array.
Unlike array(), no copy is performed if a is already an array. Subclasses are converted to base class ndarray.
Return 'a' as an array contiguous in memory (C order).
Return 'a' as an array laid out in Fortran-order in memory.
Return the representation of a number in any given base.
Return the binary representation of the input number as a string.
This is equivalent to using base_repr with base 2, but about 25x faster.
Returns the discrete, linear convolution of 1-D sequences a and v; mode can be 0 (valid), 1 (same), or 2 (full) to specify size of the resulting sequence.
Return the cross product of two (arrays of) vectors.
The cross product is performed over the last axis of a and b by default, and can handle axes with dimensions 2 and 3. For a dimension of 2, the z-component of the equivalent three-dimensional cross product is returned.
Return an empty (uninitialized) array of the shape and typecode of a.
Note that this does NOT initialize the returned array. If you require your array to be initialized, you should use zeros_like().
fromfunction(function, dimensions) returns an array constructed by calling function on a tuple of number grids. The function should accept as many arguments as there are dimensions which is a list of numbers indicating the length of the desired output for each axis.
The function can also accept keyword arguments which will be passed in as well.
Return the size of the buffer used in ufuncs.
Get the current way of handling floating-point errors.
Returns a dictionary with entries "divide", "over", "under", and "invalid", whose values are from the strings "ignore", "warn", "raise", and "call".
Return the current callback function used on floating-point errors.
identity(n) returns the identity 2-d array of shape n x n.
indices(dimensions,dtype=int_) returns an array representing a grid of indices with row-only, and column-only variation.
Returns True if 'a' is laid out in Fortran-order in memory.
Returns True if the type of num is a scalar type.
Wrapper around cPickle.load which accepts either a file-like object or a filename.
ones(shape, dtype=int_) returns an array of the given dimensions which is initialized to all ones.
outer(a,b) returns the outer product of two vectors. result(i,j) = a(i)*b(j) when a and b are vectors Will accept any arguments that can be made into vectors.
Set the size of the buffer used in ufuncs.
Set how floating-point errors are handled.
Valid values for each type of error are the strings "ignore", "warn", "raise", and "call". Returns the old settings.
Note that operations on integer scalar types (such as int16) are handled like floating point, and are affected by these settings.
Example:
>>> seterr(over='raise')
{'over': 'ignore', 'divide': 'ignore', 'invalid': 'ignore', 'under': 'ignore'}
>>> int16(32000) * int16(3)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
FloatingPointError: overflow encountered in short_scalars
Set the callback function used when a floating-point error handler is set to 'call'.
'func' should be a function that takes two arguments. The first is type of error ("divide", "over", "under", or "invalid"), and the second is the status flag (= divide + 2*over + 4*under + 8*invalid).
Returns the old handler.
Returns the dot product of 2 vectors (or anything that can be made into a vector). NB: this is not the same as dot, as it takes the conjugate of its first argument if complex and always returns a scalar.
Return an array of zeros of the shape and typecode of a.
If you don't explicitly need the array to be zeroed, you should instead use empty_like(), which is faster as it only allocates memory.