[Numpy-discussion] iterate over multiple arrays
Charles R Harris
charlesr.harris at gmail.com
Sat Oct 1 15:11:32 EDT 2011
On Sat, Oct 1, 2011 at 11:34 AM, Olivier Delalleau <shish at 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
<snip>
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111001/6e684003/attachment.html>
More information about the NumPy-Discussion
mailing list