[Numpy-discussion] First Numerical Python code...comments?
Charles R Harris
Sun Mar 4 09:59:09 CST 2007
On 3/3/07, Francesc Altet <firstname.lastname@example.org> wrote:
> > # Fill in SK with proper values
> > for i in range(numel):
> Always try to use xrange(numel) instead of range(numel). range() will
> return you a python list, and for large values of numel these can take
> precious amounts of memory. On his part, xrange() returns an iterator,
> and it never takes more than a few bytes.
I believe that is no longer the case, range is now iterable and I read
somewhere that xrange is deprecated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion