[SciPy-dev] scipy.spatial 'output' args

David Warde-Farley dwf@cs.toronto....
Fri Feb 20 03:21:32 CST 2009


This is mostly a question for Damian (sorry, I seem to be bugging you  
on a lot of fronts!). I'm wondering if there's a principled reason why  
the pdist/squareform/etc. functions don't allow you to specify an  
output array.

It seems hard to justify not having a way of avoiding repeated memory  
allocations if you're doing this more than once (as points change, for  
example -- if you're curious I'm implementing a 2-D embedding  
algorithm and the objective function relies on a lot of distances  
being recomputed).

My guess is this is a MATLABism and that this was just an oversight.  
Is there a reason I shouldn't go about trying to add it? Would other  
people find this useful?


More information about the Scipy-dev mailing list