Hi Luca

2009/7/8 Citi, Luca <lc...@essex.ac.uk>:
> Hello guys,
> I made a patch for numpy which allows performing
> operations in-place to save memory allocations.
> For example 'sqrt(a**2 + b**2)' can be performed
> allocating only two arrays instead of four.
> You find the details in ticket 1153 of numpy-core.
> I thought maybe you could be interested.
> I am impatient to have some feedback from the
> community.

In the ticket you wrote: "The approach works in most cases (it passes
most of the numpy tests) but makes the assumption that ufuncs can work
even if one of the inputs is used as output. Is this an acceptable
constraint on ufuncs?".

I don't think we can make that assumption.  People doing

c = a + b + d

expect a, b and d to remain unchanged.

If this functionality could somehow be put in a scikit, I'm sure it
would be useful (and to some extent, that is what `numexpr` does).

Regards
Stéfan
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to