[Numpy-discussion] bug or feature?
Thu Feb 8 15:42:34 CST 2007
On Thursday 08 February 2007 16:21:09 email@example.com wrote:
> I'm very surprised by the line noted. I always thinking that the input
> variable didn't change the variable itself outside the function.
Except that in this particular case, you explicitly change the input array
itself by using an inplace operator.
> I can't keep the input variable if I'm not doing a copy before to call a
what about just using var1 = var1*3 ? That way, the initial array is left
intact, and var1 inside your function is multiplied by 3.
More information about the Numpy-discussion