Hi all, The dot product can be defined for two vectors x and y by x·y=|x||y| \cos(\theta),
where theta is the angle between the vectors and |x| is the norm. Now assume that we have arrays(matrices) X = [x_1, ..., x_m] Y = [y_1, ..., y_s] m <> s Is there a built-in function to compute the following matrix for i in arange(0,m): for j in arange(0,s): MAC[i,j] = dot(X[:,i],Y[:,j])**2/(dot(X[:,i],X[:,i])*dot(Y[:,j],Y[:,j])) Each element of the matrix represents the corresponding angle squared. Nils _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion