python numpy euclidean distance calculation between matrices of row vectors

后端 未结 5 1580
一生所求
一生所求 2020-12-28 14:58

I am new to Numpy and I would like to ask you how to calculate euclidean distance between points stored in a vector.

Let\'s assume that we have a numpy.array each ro

5条回答
  •  情歌与酒
    2020-12-28 15:38

    To get the distance you can use the norm method of the linalg module in numpy:

    np.linalg.norm(x - y)
    

提交回复
热议问题