[Numpy-discussion] PyArray_FromAny does not accept a generator?
Robert Kern
robert.kern at gmail.com
Fri Jan 4 15:37:57 EST 2008
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
More information about the NumPy-Discussion
mailing list