[Numpy-discussion] partial computations
Wed Apr 11 22:38:20 CDT 2012
I am trying to optimise a code and want your suggestions.
A : - NX3 matrix (coordinates of N points)
After performing pairwise distance computations(called pdist) between these
points, depending upon a condition that the distance is in, I would perform
Most of the computations require schur products (element by element) of NXN
matrices with each other and then computing either the coloumn sum or row
As N goes to be large, these computations are taking some time (0.7 secs)
which is not much generally but since this is being called many times, it
acts as a bottleneck.
I want to leverage on the fact that many of the NXN computations are not
going to be used, or would be set to zero (if the pdist is greater than
some minimum distance).
How do i achieve it ?? Is masked array the elegant solution? Would it save
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion