On 2/4/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Keith Goodman wrote: > > There's a numpy.abs but no numpy.matlib.abs. > > > >>> import numpy as N > >>> import numpy.matlib as M > >>> > >>> N.abs? > > Type: ufunc > > Base Class: <type 'numpy.ufunc'> > > String Form: <ufunc 'absolute'> > > Namespace: Interactive > > Docstring: > > y = absolute(x) takes |x| elementwise. > > > >>> M.abs? > > Object `M.abs` not found. > > numpy.abs() is not exported via "from numpy import *", which is where > numpy.matlib gets all of its non-overridden functions from. It is not exported > because it conflicts with the builtin abs(). > > Of course, absolute() is preferred for the same reason, and > numpy.matlib.absolute() does exist.
Could numpy.matlib get the same functions as numpy? Would that have to be done with a manually maintained import list? I always use "import numpy.matlib as M" and then search for function names in ipython (M.a[TAB]). I didn't realize that some functions are missing. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion