[Numpy-discussion] memory allocation at assignment

Pierre Haessig pierre.haessig@crans....
Thu Jun 28 11:06:45 CDT 2012


Hi,

Le 28/06/2012 15:35, Travis Oliphant a écrit :
> It really is inplace.   As Nathaniel mentioned --- all ufuncs take an out keyword.  
>
> The inplace mechanism uses this so that one input and the output are the same.
Thanks for the feedback about inplace assignment.

On the other hand, just like srean mentionned, I think I also misused
the "c[:] = a+b" syntax.
I feel it's a bit confusing since this way of writing the assignment
really feels likes it happens inplace. Good to know it's not the case.

Best,
Pierre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120628/5feb271e/attachment.bin 


More information about the NumPy-Discussion mailing list