[Numpy-discussion] What is __array_wrap__ supposed to do?
Robert Kern
robert.kern at gmail.com
Sat Apr 26 23:29:51 EDT 2008
On Sat, Apr 26, 2008 at 10:04 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
> On Sat, Apr 26, 2008 at 8:59 PM, Robert Kern <robert.kern at gmail.com> wrote:
> >
> > On Sat, Apr 26, 2008 at 9:27 PM, Charles R Harris
> > <charlesr.harris at 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.
--
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