Re: [Numpy-discussion] memory allocation at assignment

2012-06-28 Thread astronomer
Hi Nathaniel, Thanks for the clearing my understand. This is exactly what i needed. Thanks, Nathaniel Smith wrote: > > On Thu, Jun 28, 2012 at 12:38 AM, astronomer > wrote: >> >> Hi All, >> I am wondering if there any difference in memory overhead between

[Numpy-discussion] memory allocation at assignment

2012-06-27 Thread astronomer
Hi All, I am wondering if there any difference in memory overhead between the following code. a=numpy.arange(10) b=numpy.arange(10) c=a+b and a=numpy.arange(10) b=numpy.arange(10) c=numpy.empty_likes(a) c[:]=a+b Does the later code make a temproray array for the result of (a+b) and then copy it