[Numpy-discussion] iterate over multiple arrays

Charles R Harris charlesr.harris@gmail....
Sat Oct 1 14:11:32 CDT 2011

On Sat, Oct 1, 2011 at 11:34 AM, Olivier Delalleau <shish@keba.be> wrote:

> It'll work, it is equivalent to the suggestion I made in my previous post
> with the f_inplace wrapper function (and it has the same drawback that numpy
> will allocate temporary memory, which wouldn't be the case if f was working
> in-place directly, by implementing it as "arr *= 2").
> Note that you don't need to write x[:] * 2, you can write x * 2 directly.

Or even x *= 2


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111001/6e684003/attachment.html 

More information about the NumPy-Discussion mailing list