[Numpy-discussion] Re: Bypassing a[2].item()?

Robert Kern robert.kern at gmail.com
Thu Apr 20 14:20:02 CDT 2006


Ryan Gutenkunst wrote:

> So questions:
> 1) I haven't followed the details of the array scalar discussions. Is it
> anticipated that array scalar arithmetic will eventually be as fast as
> arithmetic in native python types?

More or less, if I'm not mistaken. This ticket is aimed at that:

  http://projects.scipy.org/scipy/numpy/ticket/55

> 2) If not, is it possible to get a "pure" scalar directly from an array
> in one function call?

float(x[0]) seems to be faster on my PowerBook.

-- 
Robert Kern
robert.kern at gmail.com

"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