[Numpy-discussion] Applying Patch #1085

Travis Oliphant oliphant@enthought....
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[1]


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.

Anything else?

-Travis





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091204/9cf4b99d/attachment.html 


More information about the NumPy-Discussion mailing list