
4 Dec
2008
4 Dec
'08
10:55 a.m.
On Thu, Dec 4, 2008 at 8:26 AM, Olivier Grisel olivier.grisel@ensta.orgwrote:
Hi list,
Suppose I have array a with dimensions (d1, d3) and array b with dimensions (d2, d3). I want to compute array c with dimensions (d1, d2) holding the squared euclidian norms of vectors in a and b with size d3.
Just to clarify the problem a bit, it looks like you want to compute the squared euclidean distance between every vector in a and every vector in b, i.e., a distance matrix. Is that correct? Also, how big are d1,d2,d3?
If you *are* looking to compute the distance matrix I suspect your end goal is something beyond that. Could you describe what you are trying to do? I could be that scipy.spatial or scipy.cluster are what you should look at.
<snip>
Chuck