[Numpy-discussion] Where's append in NumPy??
Robert Kern
robert.kern at gmail.com
Mon Jan 8 17:29:59 EST 2007
Lou Pecora wrote:
> Where is append in NumPy? I see it in the numpy
> manual (I paid for and have the latest version), but
> when I invoke it, Python complains that it doesn't
> exist. In iPython a query like append? gives
> 'append" not found (after importing numpy). Other
> numpy functions are there (e.g. nansum on same page in
> the book). What am I missing?
What version of numpy are you using? They've been there since at least 1.0b4.
In [1]: import numpy
In [2]: numpy.app
numpy.append numpy.apply_along_axis numpy.apply_over_axes
In [2]: numpy.append?
Type: function
Base Class: <type 'function'>
Namespace: Interactive
File:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.0.2.dev3493-py2.5-macosx-10.4-i386.egg/numpy/lib/function_base.py
Definition: numpy.append(arr, values, axis=None)
Docstring:
Append to the end of an array along axis (ravel first if None)
In [3]: numpy.nansum?
Type: function
Base Class: <type 'function'>
Namespace: Interactive
File:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.0.2.dev3493-py2.5-macosx-10.4-i386.egg/numpy/lib/function_base.py
Definition: numpy.nansum(a, axis=None)
Docstring:
Sum the array over the given axis, treating NaNs as 0.
In [4]: print numpy.__version__
1.0.2.dev3493
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the NumPy-Discussion
mailing list