I have 3D array as
A = [[x1 y1 z1]
[x2 y2 z2]
[x3 y3 z3]]
I have to find euclidean distance between each points so that I'll get output with only 3 distance between (row0,row1)
,(row1,row2)
and (row0,row2)
.
I have some code
dist = scipy.spatial.distance.cdist(A,A, 'euclidean')
but it will give distance in matrix form as
dist= [[0 a b]
[a 0 c]
[b c 0]]
I want results as [a b c]
.