Neal Becker wrote:
> It seems that PyArray_FromAny does not accept a generator?
> 
> Seems like this would be useful.

It's difficult to do all the magical interpretation that PyArray_FromAny() does
with a iterator of unknown length. In Python, we have fromiter() which will
consume an iterator to make (only) a rank-1 array and thus sidestep a big chunk
of the magical interpretation.

-- 
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
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to