[Numpy-discussion] fromiter typo?
Pauli Virtanen
pav at iki.fi
Mon Dec 1 14:56:51 EST 2008
Mon, 01 Dec 2008 14:43:11 -0500, Neal Becker wrote:
> Says it takes a default dtype arg, but doesn't act like it's an optional
> arg:
>
> fromiter (iterator or generator, dtype=None) Construct an array from an
> iterator or a generator. Only handles 1-dimensional cases. By default
> the data-type is determined from the objects returned from the iterator.
>
> ---> 20 z = fromiter (y)
>
> TypeError: function takes at least 2 arguments (1 given)
The docstring is correct in 1.2.1 and in the documentation; I suppose you
have an older version of Numpy.
--
Pauli Virtanen
More information about the NumPy-Discussion
mailing list