[Numpy-discussion] fromiter typo?

Pauli Virtanen pav@iki...
Mon Dec 1 13:56:51 CST 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