[Numpy-discussion] Applying Patch #1085
Fri Dec 4 07:29:55 CST 2009
What do people think of applying patch #1085. This patch makes a
copy of inputs when the input and output views overlap in ways in
which one computation will change later computations.
i.e. what is the output of?
x = ones((10,3))
x += x
I think that copying in such instances is a good idea and it looks
like the patch has received careful review.
The only downsides I can see are:
1) Increased overhead of the check --- this looks very small
2) Subtle change in behavior --- it's hard to imagine that somebody
would be relying on the specific behavior of overlapping views writing
into the same output (I know it's something we warn against in
teaching) -- but switching from it is a change.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion