[Numpy-discussion] matlab vs. python question

Sturla Molden sturla@molden...
Thu Apr 26 08:04:42 CDT 2007


On 4/26/2007 2:42 PM, David Cournapeau wrote:

 > You are true for the semantics, but wrong for the consequences on 
copying, as matlab is using COW, and this works well in matlab.

It works well only if you don't change your input arguments. Never try 
to write to a matrix received as an argument in a function call. If you 
do, the memory expenditure may grow very rapidly.

But as long a s NumPy does not use lazy evaluation the difference is not 
as striking as it could be.


S.M.


More information about the Numpy-discussion mailing list