[Numpy-discussion] How to avoid extra copying when forming an array from an iterator

Robert Kern robert.kern@gmail....
Fri Jun 24 09:12:18 CDT 2011

On Fri, Jun 24, 2011 at 04:03, srean <srean.list@gmail.com> wrote:
> To answer my own question, I guess I can keep appending to a array.array()
> object and get a numpy.array from its buffer if possible.  Is that the
> efficient way.

It's one of the most efficient ways to do it, yes, especially for 1D arrays.

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