Version 1.0b1 API Documentation generated by Endo 2006-08-14
around = round_
Return the length of a Python object interpreted as an array of at least 1 dimension.
Return true if all elements of x are true:
Perform a logical_and over the given axis.
Return the maximum of 'a' along dimension axis.
Return the minimum of a along dimension axis.
Return true if any elements of x are true:
argmax(a,axis=-1) returns the indices to the maximum value of the 1-D arrays along the given axis.
argmin(a,axis=-1) returns the indices to the minimum value of the 1-D arrays along the given axis.
argsort(a,axis=-1) return the indices into a of the sorted array along the given axis, so that take(a,result,axis) is the sorted array.
clip(m, m_min, m_max) = every entry in m that is less than m_min is replaced by m_min, and every entry greater than m_max is replaced by m_max.
compress(condition, x, axis=-1) = those elements of x corresponding to those elements of condition that are "true". condition must be the same size as the given dimension of x.
Return the cumulative product of the elments along the given axis
Sum the array over the given axis.
Sum the array over the given axis.
diagonal(a, offset=0, axis1=0, axis2=1) returns the given diagonals defined by the last two dimensions of the array.
nonzero(a) returns the indices of the elements of a which are not zero, a must be 1d
Return the product of the elements along the given axis
Product of the array elements over the given axis.
Return maximum - minimum along the the given dimension
put(a, ind, v) results in a[n] = v[n] for all n in ind
If v is shorter than mask it will be repeated as necessary.
In particular v can be a scalar or length 1 array.
The routine put is the equivalent of the following (although the loop
is in C for speed):
ind = array(indices, copy=False)
v = array(values, copy=False).astype(a.dtype)
for i in ind: a.flat[i] = v[i]
a must be a contiguous numpy array.
putmask(a, mask, v) results in a = v for all places mask is true. If v is shorter than mask it will be repeated as necessary. In particular v can be a scalar or length 1 array.
Get the rank of sequence a (the number of dimensions, not a matrix rank) The rank of a scalar is zero.
ravel(m) returns a 1d array corresponding to all the elements of it's argument. The new array is a view of m if possible, otherwise it is a copy.
repeat elements of a repeats times along axis repeats is a sequence of length a.shape[axis] telling how many times to repeat each element. If repeats is an integer, it is interpreted as a tuple of length a.shape[axis] containing repeats. The argument a can be anything array(a) will accept.
Change the shape of a to newshape. Return a new view object if possible otherwise return a copy.
resize(a,new_shape) returns a new array with the specified shape. The original array's total size can be any size. It fills the new array with repeated copies of a.
Note that a.resize(new_shape) will fill array with 0's beyond current definition of a.
Round 'a' to the given number of decimal places. Rounding behaviour is equivalent to Python.
Return 'a' if the array is not floating point. Round both the real and imaginary parts separately if the array is complex.
searchsorted(a, v)
shape(a) returns the shape of a (as a function call which also works on nested sequences).
Get the number of elements in sequence a, or along a certain axis.
Perform a logical_or over the given axis.
sort(a,axis=-1) returns array with elements sorted along given axis.
Returns a with any ones from the shape of a removed
Sum the array over the given axis. The optional dtype argument
is the data type for intermediate calculations.
The default is to upcast (promote) smaller integer types to the
platform-dependent Int. For example, on 32-bit platforms:
x.dtype default sum() dtype
---------------------------------------------------
bool, Int8, Int16, Int32 Int32
Examples:
>>> sum([0.5, 1.5])
2.0
>>> sum([0.5, 1.5], dtype=Int32)
1
>>> sum([[0, 1], [0, 5]])
array([0, 6])
>>> sum([[0, 1], [0, 5]], axis=1)
array([1, 5])
swapaxes(a, axis1, axis2) returns array a with axis1 and axis2 interchanged.
trace(a,offset=0, axis1=0, axis2=1) returns the sum along diagonals (defined by the last two dimenions) of the array.
transpose(a, axes=None) returns a view of the array with dimensions permuted according to axes. If axes is None (default) returns array with dimensions reversed.
| Local name | Refers to |
|---|---|
| absolute | umath.absolute |
| array | multiarray.array |
| asanyarray | numpy.core.numeric.asanyarray |
| asarray | numpy.core.numeric.asarray |
| concatenate | numpy.core.numeric.concatenate |
| correlate | numpy.core.numeric.correlate |
| mu | multiarray |
| multiply | umath.multiply |
| nt | numpy.core.numerictypes |
| outer | numpy.core.numeric.outer |
| sign | umath.sign |
| sys | sys |
| types | types |
| um | umath |
| _nx | numpy.core.numeric |