[Numpy-discussion] Broadcasting question
Charles R Harris
Thu Dec 4 10:55:26 CST 2008
On Thu, Dec 4, 2008 at 8:26 AM, Olivier Grisel <firstname.lastname@example.org>wrote:
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion