On 11/12/05, Robert Kern <[EMAIL PROTECTED]> wrote:
> Shi Mu wrote:
> > i got confused by the use of array and arange.
> > arange get array and range get list, why we need the two different types?
>
> When you're asking questions about a third-party module, it's a good
> idea to mention the module. In this case you're asking about scipy_core
> (hopefully) or else numarray or Numeric.
>
> The answer to your question is that sometimes we need to get largish
> arrays (not lists) of consecutive numbers quickly. array(range(N)) is
> wasteful of memory and time because it has to create a list of Python
> ints that are simply going to be thrown away once we're done converting
> to the needed array.
>
> --
> Robert Kern
> [EMAIL PROTECTED]
sorry to forget to mention the module name : Numeric
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to