numpy.oldnumeric (version 1.3.0)
index
/usr/lib/python2.6/dist-packages/numpy/oldnumeric/__init__.py

# Don't add these to the __all__ variable though

 
Package Contents
        __init__
alter_code1 -- This module converts code written for Numeric to run with numpy
alter_code2
array_printer
arrayfns -- Backward compatible with arrayfns from Numeric
compat
fft
fix_default_axis
functions
linear_algebra -- Backward compatible with LinearAlgebra from Numeric
ma
matrix
misc
mlab
precision
random_array
rng
rng_stats
setup
setupscons
typeconv
ufuncs
user_array

 
Functions
       
_move_axis_to_0(a, axis)
dump(...)
dump(obj, file, protocol=0) -- Write an object in pickle format to the given file.
 
See the Pickler docstring for the meaning of optional argument proto.
dumps(...)
dumps(obj, protocol=0) -- Return a string containing an object in pickle format.
 
See the Pickler docstring for the meaning of optional argument proto.
innerproduct = inner(...)
inner(a, b)
 
Inner product of two arrays.
 
Ordinary inner product of vectors for 1-D arrays (without complex
conjugation), in higher dimensions a sum product over the last axes.
 
Parameters
----------
a, b : array_like
    If `a` and `b` are nonscalar, their last dimensions of must match.
 
Returns
-------
out : ndarray
    `out.shape = a.shape[:-1] + b.shape[:-1]`
 
Raises
------
ValueError
    If the last dimension of `a` and `b` has different size.
 
See Also
--------
tensordot : Sum products over arbitrary axes.
dot : Generalised matrix product, using second last dimension of `b`.
 
Notes
-----
For vectors (1-D arrays) it computes the ordinary inner-product::
 
    np.inner(a, b) = sum(a[:]*b[:])
 
More generally, if `ndim(a) = r > 0` and `ndim(b) = s > 0`::
 
    np.inner(a, b) = np.tensordot(a, b, axes=(-1,-1))
 
or explicitly::
 
    np.inner(a, b)[i0,...,ir-1,j0,...,js-1]
         = sum(a[i0,...,ir-1,:]*b[j0,...,js-1,:])
 
In addition `a` or `b` may be scalars, in which case::
 
   np.inner(a,b) = a*b
 
Examples
--------
Ordinary inner product for vectors:
 
>>> a = np.array([1,2,3])
>>> b = np.array([0,1,0])
>>> np.inner(a, b)
2
 
A multidimensional example:
 
>>> a = np.arange(24).reshape((2,3,4))
>>> b = np.arange(4)
>>> np.inner(a, b)
array([[ 14,  38,  62],
       [ 86, 110, 134]])
 
An example where `b` is a scalar:
 
>>> np.inner(np.eye(2), 7)
array([[ 7.,  0.],
       [ 0.,  7.]])

 
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 = 'b'
Int16 = 'h'
Int32 = 'i'
Int64 = 'l'
Int8 = 'b'
LittleEndian = True
NewAxis = None
PyObject = 'O'
UInt = 'u'
UInt16 = 'H'
UInt32 = 'I'
UInt64 = 'L'
UInt8 = 'B'
UnsignedInt = 'u'
UnsignedInt16 = 'H'
UnsignedInt32 = 'I'
UnsignedInt64 = 'L'
UnsignedInt8 = 'B'
UnsignedInteger = 'u'
__all__ = ['__version__', 'NewAxis', 'UFuncType', 'UfuncType', 'ArrayType', 'arraytype', 'LittleEndian', 'arrayrange', 'matrixmultiply', 'array_constructor', 'pickle_array', 'DumpArray', 'LoadArray', 'multiarray', 'dump', 'dumps', 'load', 'loads', 'Unpickler', 'Pickler', ...]
__file__ = '/usr/lib/python2.6/dist-packages/numpy/oldnumeric/__init__.pyc'
__name__ = 'numpy.oldnumeric'
__package__ = 'numpy.oldnumeric'
__path__ = ['/usr/lib/python2.6/dist-packages/numpy/oldnumeric']
divide_safe = <ufunc 'divide'>
typecodes = {'Character': 'c', 'Complex': 'FD', 'Float': 'fd', 'Integer': 'bhil', 'UnsignedInteger': 'BHIL'}