Numeric (version 24.2)
index
/usr/lib/python2.6/dist-packages/Numeric/Numeric.py

Numeric module defining a multi-dimensional array and useful procedures for
   Numerical computation.
 
Functions
 
-   array                      - NumPy Array construction
-   zeros                      - Return an array of all zeros
-   empty                      - Return an uninitialized array (200x faster than zeros)
-   shape                      - Return shape of sequence or array
-   rank                       - Return number of dimensions
-   size                       - Return number of elements in entire array or a
                                 certain dimension
-   fromstring                 - Construct array from (byte) string
-   take                       - Select sub-arrays using sequence of indices
-   put                        - Set sub-arrays using sequence of 1-D indices
-   putmask                    - Set portion of arrays using a mask
-   reshape                    - Return array with new shape
-   repeat                     - Repeat elements of array
-   choose                     - Construct new array from indexed array tuple
-   cross_correlate            - Correlate two 1-d arrays
-   searchsorted               - Search for element in 1-d array
-   sum                        - Total sum over a specified dimension
-   average                    - Average, possibly weighted, over axis or array.
-   cumsum                     - Cumulative sum over a specified dimension
-   product                    - Total product over a specified dimension
-   cumproduct                 - Cumulative product over a specified dimension
-   alltrue                    - Logical and over an entire axis
-   sometrue                   - Logical or over an entire axis
-   allclose                   - Tests if sequences are essentially equal
 
More Functions:
 
-   arrayrange (arange)        - Return regularly spaced array
-   asarray                    - Guarantee NumPy array
-   sarray                     - Guarantee a NumPy array that keeps precision
-   convolve                   - Convolve two 1-d arrays
-   swapaxes                   - Exchange axes
-   concatenate                - Join arrays together
-   transpose                  - Permute axes
-   sort                       - Sort elements of array
-   argsort                    - Indices of sorted array
-   argmax                     - Index of largest value
-   argmin                     - Index of smallest value
-   innerproduct               - Innerproduct of two arrays
-   dot                        - Dot product (matrix multiplication)
-   outerproduct               - Outerproduct of two arrays
-   resize                     - Return array with arbitrary new shape
-   indices                    - Tuple of indices
-   fromfunction               - Construct array from universal function
-   diagonal                   - Return diagonal array
-   trace                      - Trace of array
-   dump                       - Dump array to file object (pickle)
-   dumps                      - Return pickled string representing data
-   load                       - Return array stored in file object
-   loads                      - Return array from pickled string
-   ravel                      - Return array as 1-D
-   nonzero                    - Indices of nonzero elements for 1-D array
-   shape                      - Shape of array
-   where                      - Construct array from binary result
-   compress                   - Elements of array where condition is true
-   clip                       - Clip array between two values
-   ones                       - Array of all ones
-   identity                   - 2-D identity array (matrix)
 
(Universal) Math Functions
 
       add                    logical_or             exp
       subtract               logical_xor            log
       multiply               logical_not            log10
       divide                 maximum                sin
       divide_safe            minimum                sinh
       conjugate              bitwise_and            sqrt
       power                  bitwise_or             tan
       absolute               bitwise_xor            tanh
       negative               invert                 ceil
       greater                left_shift             fabs
       greater_equal          right_shift            floor
       less                   arccos                 arctan2
       less_equal             arcsin                 fmod
       equal                  arctan                 hypot
       not_equal              cos                    around
       logical_and            cosh                   sign
       arccosh                arcsinh                arctanh

 
Modules
       
_numpy
copy
copy_reg
math
multiarray
pickle
string
types

 
Classes
       
Pickler
Pickler
Unpickler
Unpickler

 
class Pickler(Pickler)
     Methods defined here:
save_array(self, object)

Data and other attributes defined here:
dispatch = {<type 'classobj'>: <function save_global at 0x29b5c80>, <type 'instance'>: <function save_inst at 0x29b5c08>, <type 'float'>: <function save_float at 0x29b57d0>, <type 'int'>: <function save_int at 0x29b56e0>, <type 'list'>: <function save_list at 0x29b5a28>, <type 'long'>: <function save_long at 0x29b5758>, <type 'dict'>: <function save_dict at 0x29b5b18>, <type 'NoneType'>: <function save_none at 0x29b55f0>, <type 'str'>: <function save_string at 0x29b5848>, <type 'tuple'>: <function save_tuple at 0x29b5938>, ...}

Methods inherited from Pickler:
__init__(self, file, protocol=None)
This takes a file-like object for writing a pickle data stream.
 
The optional protocol argument tells the pickler to use the
given protocol; supported protocols are 0, 1, 2.  The default
protocol is 0, to be backwards compatible.  (Protocol 0 is the
only protocol that can be written to a file opened in text
mode and read back successfully.  When using a protocol higher
than 0, make sure the file is opened in binary mode, both when
pickling and unpickling.)
 
Protocol 1 is more efficient than protocol 0; protocol 2 is
more efficient than protocol 1.
 
Specifying a negative protocol version selects the highest
protocol version supported.  The higher the protocol used, the
more recent the version of Python needed to read the pickle
produced.
 
The file parameter must have a write() method that accepts a single
string argument.  It can thus be an open file object, a StringIO
object, or any other custom object that meets this interface.
clear_memo(self)
Clears the pickler's "memo".
 
The memo is the data structure that remembers which objects the
pickler has already seen, so that shared or recursive objects are
pickled by reference and not by value.  This method is useful when
re-using picklers.
dump(self, obj)
Write a pickled representation of obj to the open file.
get(self, i, pack=<built-in function pack>)
# Return a GET (BINGET, LONG_BINGET) opcode string, with argument i.
memoize(self, obj)
Store an object in the memo.
persistent_id(self, obj)
put(self, i, pack=<built-in function pack>)
# Return a PUT (BINPUT, LONG_BINPUT) opcode string, with argument i.
save(self, obj)
save_bool(self, obj)
save_dict(self, obj)
save_empty_tuple(self, obj)
save_empty_tuple() isn't used by anything in Python 2.3.  However, I
# found a Pickler subclass in Zope3 that calls it, so it's not harmless
# to remove it.
save_float(self, obj, pack=<built-in function pack>)
save_global(self, obj, name=None, pack=<built-in function pack>)
save_inst(self, obj)
save_int(self, obj, pack=<built-in function pack>)
save_list(self, obj)
save_long(self, obj, pack=<built-in function pack>)
save_none(self, obj)
save_pers(self, pid)
save_reduce(self, func, args, state=None, listitems=None, dictitems=None, obj=None)
save_string(self, obj, pack=<built-in function pack>)
save_tuple(self, obj)
save_unicode(self, obj, pack=<built-in function pack>)

 
class Unpickler(Unpickler)
     Methods defined here:
load_array(self)

Data and other attributes defined here:
dispatch = {'': <function load_eof at 0x29b5f50>, '(': <function load_mark at 0x29b8a28>, ')': <function load_empty_tuple at 0x29b7a28>, '.': <function load_stop at 0x29b8aa0>, '0': <function load_pop at 0x29b8398>, '1': <function load_pop_mark at 0x29b8410>, '2': <function load_dup at 0x29b8488>, 'A': <function load_array at 0x29ba500>, 'F': <function load_float at 0x29b7668>, 'G': <function load_binfloat at 0x29b76e0>, ...}

Methods inherited from Unpickler:
__init__(self, file)
This takes a file-like object for reading a pickle data stream.
 
The protocol version of the pickle is detected automatically, so no
proto argument is needed.
 
The file-like object must have two methods, a read() method that
takes an integer argument, and a readline() method that requires no
arguments.  Both methods should return a string.  Thus file-like
object can be a file object opened for reading, a StringIO object,
or any other custom object that meets this interface.
find_class(self, module, name)
get_extension(self, code)
load(self)
Read a pickled object representation from the open file.
 
Return the reconstituted object hierarchy specified in the file.
load_append(self)
load_appends(self)
load_binfloat(self, unpack=<built-in function unpack>)
load_binget(self)
load_binint(self)
load_binint1(self)
load_binint2(self)
load_binpersid(self)
load_binput(self)
load_binstring(self)
load_binunicode(self)
load_build(self)
load_dict(self)
load_dup(self)
load_empty_dictionary(self)
load_empty_list(self)
load_empty_tuple(self)
load_eof(self)
load_ext1(self)
load_ext2(self)
load_ext4(self)
load_false(self)
load_float(self)
load_get(self)
load_global(self)
load_inst(self)
load_int(self)
load_list(self)
load_long(self)
load_long1(self)
load_long4(self)
load_long_binget(self)
load_long_binput(self)
load_mark(self)
load_newobj(self)
load_none(self)
load_obj(self)
load_persid(self)
load_pop(self)
load_pop_mark(self)
load_proto(self)
load_put(self)
load_reduce(self)
load_setitem(self)
load_setitems(self)
load_short_binstring(self)
load_stop(self)
load_string(self)
load_true(self)
load_tuple(self)
load_tuple1(self)
load_tuple2(self)
load_tuple3(self)
load_unicode(self)
marker(self)
# Return largest index k such that self.stack[k] is self.mark.
# If the stack doesn't contain a mark, eventually raises IndexError.
# This could be sped by maintaining another stack, of indices at which
# the mark appears.  For that matter, the latter stack would suffice,
# and we wouldn't need to push mark objects on self.stack at all.
# Doing so is probably a good thing, though, since if the pickle is
# corrupt (or hostile) we may get a clue from finding self.mark embedded
# in unpickled objects.

 
Functions
       
DumpArray(m, fp)
LoadArray(fp)
_move_axis_to_0(a, axis)
allclose(a, b, rtol=1.0000000000000001e-05, atol=1e-08)
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.
alltrue(x, axis=0)
Perform a logical_and over the given axis.
arange(...)
arange(start, stop=None, step=1, typecode=None)
 
 Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
argmax(a, axis=-1)
argmax(a,axis=-1) returns the indices to the maximum value of the
1-D arrays along the given axis.
argmin(a, axis=-1)
argmin(a,axis=-1) returns the indices to the minimum value of the
1-D arrays along the given axis.
argsort(a, axis=-1)
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.
around(m, decimals=0)
around(m, decimals=0)     Round in the same way as standard python performs rounding. Returns
always a float.
array(...)
array(sequence, typecode=None, copy=1, savespace=0) will return a new array formed from the given (potentially nested) sequence with type given by typecode.  If no typecode is given, then the type will be determined as the minimum type required to hold the objects in sequence.  If copy is zero and sequence is already an array, a reference will be returned.  If savespace is nonzero, the new array will maintain its precision in operations.
array_constructor(shape, typecode, thestr, Endian=1)
array_repr(a, max_line_width=None, precision=None, suppress_small=None)
array_str(a, max_line_width=None, precision=None, suppress_small=None)
arrayrange = arange(...)
arange(start, stop=None, step=1, typecode=None)
 
 Just like range() except it returns an array whose type can be
specified by the keyword argument typecode.
asarray(a, typecode=None, savespace=0)
asarray(a,typecode=None) returns a as a NumPy array.  Unlike array(),
no copy is performed if a is already an array.
average(a, axis=0, weights=None, returned=0)
average(a, axis=0, weights=None)
Computes average along indicated axis.
If axis is None, average over the entire array.
Inputs can be integer or floating types; result is type Float.
 
If weights are given, result is:
    sum(a*weights)/(sum(weights))
weights must have a's shape or be the 1-d with length the size
of a in the given axis. Integer weights are converted to Float.
 
Not supplying weights is equivalent to supply weights that are
all 1.
 
If returned, return a tuple: the result and the sum of the weights
or count of values. The shape of these two results will be the same.
 
raises ZeroDivisionError if appropriate when result is scalar.
(The version in MA does not -- it returns masked values).
choose(...)
choose(a, (b1,b2,...))
clip(m, m_min, m_max)
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, m, axis=-1)
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.
concatenate(a, axis=0)
concatenate(a, axis=0) joins the tuple of sequences in a into a single
NumPy array.
convolve(a, v, mode=2)
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.
cross_correlate(...)
cross_correlate(a,v, mode=0)
cross_product(a, b, axis1=-1, axis2=-1)
Return the cross product of two vectors.
 
The cross product is performed over the last axes 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.
cumproduct(x, axis=0)
Sum the array over the given axis.
cumsum(x, axis=0)
Sum the array over the given axis.
diagonal(a, offset=0, axis1=0, axis2=1)
diagonal(a, offset=0, axis1=0, axis2=1) returns all offset diagonals
defined by the given dimensions of the array.
dot(a, b)
dot(a,b) returns matrix-multiplication between a and b.  The product-sum
is over the last dimension of a and the second-to-last dimension of b.
empty(...)
empty((d1,...,dn),typecode='l',savespace=0) will return a new array
of shape (d1,...,dn) and given type with all its entries uninitialized.  If savespace is
nonzero, the array will be a spacesaver array.  This can be faster than zeros.
fromfunction(function, dimensions)
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.
fromstring(...)
fromstring(string, typecode='l', count=-1) returns a new 1d array initialized from the raw binary data in string.  If count is positive, the new array will have count elements, otherwise it's size is determined by the size of string.
identity(n, typecode='l')
identity(n) returns the identity matrix of shape n x n.
indices(dimensions, typecode=None)
indices(dimensions,typecode=None) returns an array representing a grid
of indices with row-only, and column-only variation.
innerproduct(a, b)
innerproduct(a,b) returns the dot product of two arrays, which has
shape a.shape[:-1] + b.shape[:-1] with elements computed by summing the
product of the elements from the last dimensions of a and b.
matrixmultiply = dot(a, b)
dot(a,b) returns matrix-multiplication between a and b.  The product-sum
is over the last dimension of a and the second-to-last dimension of b.
nonzero(a)
nonzero(a) returns the indices of the elements of a which are not zero,
a must be 1d
ones(shape, typecode='l', savespace=0)
ones(shape, typecode=Int, savespace=0) returns an array of the given
dimensions which is initialized to all ones.
outerproduct(a, b)
outerproduct(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.
pickle_array(a)
product(x, axis=0)
Product of the array elements over the given axis.
put(a, ind, v)
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=0)
    v = array(values, copy=0).astype(a, typecode())
    for i in ind: a.flat[i] = v[i]
a must be a contiguous Numeric array.
putmask(a, mask, v)
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.
rank(a)
Get the rank of sequence a (the number of dimensions, not a matrix rank)
The rank of a scalar is zero.
ravel(m)
ravel(m) returns a 1d array corresponding to all the elements of it's
argument.
repeat(a, repeats, axis=0)
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.
reshape(...)
reshape(a, (d1, d2, ..., dn)).  Change the shape of a to be an n-dimensional array with dimensions given by d1...dn.  Note: the size specified for the new array must be exactly equal to the size of the  old one or an error will occur.
resize(a, new_shape)
resize(a,new_shape) returns a new array with the specified shape.
The original array's total size can be any size.
sarray(a, typecode=None, copy=0)
sarray(a, typecode=None, copy=0) calls array with savespace=1.
searchsorted = binarysearch(...)
binarysearch(a,v)
shape(a)
Get the shape of sequence a
sign(m)
sign(m) gives an array with shape of m with elements defined by sign
function:  where m is less than 0 return -1, where m greater than 0, a=1,
elsewhere a=0.
size(a, axis=None)
Get the number of elements in sequence a, or along a certain axis.
sometrue(x, axis=0)
Perform a logical_or over the given axis.
sort(a, axis=-1)
sort(a,axis=-1) returns array with elements sorted along given axis.
sum(x, axis=0)
Sum the array over the given axis.
swapaxes(a, axis1, axis2)
swapaxes(a, axis1, axis2) returns array a with axis1 and axis2
interchanged.
take(...)
take(a, indices, axis=0).  Selects the elements in indices from array a along the given axis.
trace(a, offset=0, axis1=0, axis2=1)
trace(a,offset=0, axis1=0, axis2=1) returns the sum along diagonals
(defined by the last two dimensions) of the array.
transpose(a, axes=None)
transpose(a, axes=None) returns array with dimensions permuted
according to axes.  If axes is None (default) returns array with
dimensions reversed.
vdot(a, b)
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.
where(condition, x, y)
where(condition,x,y) is shaped like condition and has elements of x and
y where condition is respectively true or false.
zeros(...)
zeros((d1,...,dn),typecode='l',savespace=0) will return a new array of shape (d1,...,dn) and type typecode with all it's entries initialized to zero.  If savespace is nonzero the array will be a spacesaver array.

 
Data
        Character = 'c'
Complex = 'D'
Complex0 = 'F'
Complex16 = 'F'
Complex32 = 'F'
Complex64 = 'D'
Complex8 = 'F'
Float = 'd'
Float0 = 'f'
Float16 = 'f'
Float32 = 'f'
Float64 = 'd'
Float8 = 'f'
Int = 'l'
Int0 = '1'
Int16 = 's'
Int32 = 'i'
Int64 = 'l'
Int8 = '1'
LittleEndian = 1
NewAxis = None
PyObject = 'O'
UInt = 'u'
UInt16 = 'w'
UInt32 = 'u'
UInt8 = 'b'
UnsignedInt16 = 'w'
UnsignedInt32 = 'u'
UnsignedInt8 = 'b'
UnsignedInteger = 'u'
__file__ = '/usr/lib/python2.6/dist-packages/Numeric/Numeric.pyc'
__name__ = 'Numeric'
__version__ = '24.2'
absolute = <ufunc 'absolute'>
add = <ufunc 'add'>
arccos = <ufunc 'arccos'>
arccosh = <ufunc 'arccosh'>
arcsin = <ufunc 'arcsin'>
arcsinh = <ufunc 'arcsinh'>
arctan = <ufunc 'arctan'>
arctan2 = <ufunc 'arctan2'>
arctanh = <ufunc 'arctanh'>
bitwise_and = <ufunc 'bitwise_and'>
bitwise_or = <ufunc 'bitwise_or'>
bitwise_xor = <ufunc 'bitwise_xor'>
ceil = <ufunc 'ceil'>
conjugate = <ufunc 'conjugate'>
cos = <ufunc 'cos'>
cosh = <ufunc 'cosh'>
divide = <ufunc 'divide'>
divide_safe = <ufunc 'divide_safe'>
e = 2.7182818284590451
equal = <ufunc 'equal'>
exp = <ufunc 'exp'>
fabs = <ufunc 'fabs'>
floor = <ufunc 'floor'>
floor_divide = <ufunc 'floor_divide'>
fmod = <ufunc 'fmod'>
greater = <ufunc 'greater'>
greater_equal = <ufunc 'greater_equal'>
hypot = <ufunc 'hypot'>
invert = <ufunc 'invert'>
left_shift = <ufunc 'left_shift'>
less = <ufunc 'less'>
less_equal = <ufunc 'less_equal'>
log = <ufunc 'log'>
log10 = <ufunc 'log10'>
logical_and = <ufunc 'logical_and'>
logical_not = <ufunc 'logical_not'>
logical_or = <ufunc 'logical_or'>
logical_xor = <ufunc 'logical_xor'>
maximum = <ufunc 'maximum'>
minimum = <ufunc 'minimum'>
multiply = <ufunc 'multiply'>
negative = <ufunc 'negative'>
not_equal = <ufunc 'not_equal'>
pi = 3.1415926535897931
power = <ufunc 'power'>
remainder = <ufunc 'remainder'>
right_shift = <ufunc 'right_shift'>
sin = <ufunc 'sin'>
sinh = <ufunc 'sinh'>
sqrt = <ufunc 'sqrt'>
subtract = <ufunc 'subtract'>
tan = <ufunc 'tan'>
tanh = <ufunc 'tanh'>
true_divide = <ufunc 'true_divide'>
typecodes = {'Character': 'c', 'Complex': 'FD', 'Float': 'fd', 'Integer': '1sil', 'UnsignedInteger': 'bwu'}