Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy euclidean distance matrix broadcasting

 np.sqrt((np.square(a[:,np.newaxis]-b).sum(axis=2)))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #euclidean #distance #matrix #broadcasting
ADD COMMENT
Topic
Name
4+7 =