[Numpy-discussion] using numpy functions on an array of objects
Sat Jan 31 10:30:58 CST 2009
Wouldn't it be nice to have numpy a little more generic?
All that would be needed was a little check of the arguments.
If I do:
shouldn't numpy be smart enough to regard the 4 as a 1x1 array?
x = my_class(4)
wouldn't it be nice if
Wouldn't it be nice if numpy worked a little more consistent.
Is this worth a ticket? Or am I missing something here?
On Fri, Jan 30, 2009 at 10:05 PM, Robert Kern <firstname.lastname@example.org> wrote:
> On Fri, Jan 30, 2009 at 13:18, Christopher Barker <Chris.Barker@noaa.gov> wrote:
>> I think you want to subclass an ndarray here. It's a bit tricky to so,
>> but if you look in the wiki and these mailing list archives, you'll find
>> advise on how to do it.
> That still won't work. numpy.linalg.inv() simply does a particular
> algorithm on float and complex arrays and nothing else.
> 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
> Numpy-discussion mailing list
More information about the Numpy-discussion