Consider using scipy.spatial.distance.pdist.
You can do like this.
>>> A = np.array([[1, 2, 3], [4, 5, 6], [10, 20, 30]])
>>> scipy.spatial.distance.pdist(A)
array([ 5.19615242, 33.67491648, 28.93095228])
But be careful the order of the output distance is (row0,row1),(row0,row2) and (row1,row2).