Torgil Svensson wrote:
>> Yes. fromiter(iterable, dtype, count) works.
>>
>
> Oh. Thanks. I probably had too old documentation to see this (15
> June). If it's not updated since I'll give Travis a rest about this,
> at least until 1.0 is released :)
>
Actually I just knew 'cause I wrote it.
> Yes. fromiter(iterable, dtype, count) works.
Oh. Thanks. I probably had too old documentation to see this (15
June). If it's not updated since I'll give Travis a rest about this,
at least until 1.0 is released :)
> Regardless, L is only iterated over once.
How can this be true? If no size is
Torgil Svensson wrote:
>>return uL,asmatrix(fromiter((idx[x] for x in L),dtype=int))
>>
>
> Is it possible for fromiter to take an optional shape (or count)
> argument in addition to the dtype argument?
Yes. fromiter(iterable, dtype, count) works.
> If both is given it could
> preallocat
David M. Cooke wrote:
>On Sat, Jun 10, 2006 at 01:18:05PM -0700, Tim Hochberg wrote:
>
>
>>I finally got around to cleaning up and checking in fromiter. As Travis
>>suggested, this version does not require that you specify count. From
>>the docstring:
>>
>>fromiter(...)
>>fromiter(
David M. Cooke wrote:
> Can this be integrated into array() so that array(iterable, dtype=dtype)
> does the expected thing?
That was rejected early on because array() is so incredibly overloaded as it is.
http://article.gmane.org/gmane.comp.python.numeric.general/5756
--
Robert Kern
"I have c
On Sat, Jun 10, 2006 at 01:18:05PM -0700, Tim Hochberg wrote:
>
> I finally got around to cleaning up and checking in fromiter. As Travis
> suggested, this version does not require that you specify count. From
> the docstring:
>
> fromiter(...)
> fromiter(iterable, dtype, count=-1)
Travis Oliphant wrote:
>Tim Hochberg wrote:
>
>
>>Some time ago some people, myself including, were making some noise
>>about having 'array' iterate over iterable object producing ndarrays in
>>a manner analogous to they way sequences are treated. I finally got
>>around to looking at it serio
Tim Hochberg wrote:
> Some time ago some people, myself including, were making some noise
> about having 'array' iterate over iterable object producing ndarrays in
> a manner analogous to they way sequences are treated. I finally got
> around to looking at it seriously and once I came to the fol