[Numpy-discussion] What is __array_wrap__ supposed to do?
Charles R Harris
charlesr.harris@gmail....
Sat Apr 26 22:56:39 CDT 2008
On Sat, Apr 26, 2008 at 9:29 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Sat, Apr 26, 2008 at 10:04 PM, Charles R Harris
> <charlesr.harris@gmail.com> wrote:
> >
> > On Sat, Apr 26, 2008 at 8:59 PM, Robert Kern <robert.kern@gmail.com>
> wrote:
> > >
> > > On Sat, Apr 26, 2008 at 9:27 PM, Charles R Harris
> > > <charlesr.harris@gmail.com> wrote:
> > > > Because it doesn't do what it says it does.
> > >
> > >
> > > > Here is what the docstring says:
> > > >
> > > > Help on method_descriptor:
> > > >
> > > > __array_wrap__(...)
> > > > a.__array_wrap__(obj) -> Object of same type as a from ndarray
> obj.
> > >
> > > Python type, not numpy dtype.
> >
> > So basically it's good for keeping matrices matrices?
>
> Yes, that is what it is used for.
>
I'm working through the linalg module. There is currently variation as to
whether or not eigenvalues/singular_values/residuals, are returned as arrays
or as matrices. I'm leaning towards making them all matrices. What do you
think?
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080426/1856d84d/attachment.html
More information about the Numpy-discussion
mailing list