X = np.array(list_of_objects)
distances = pdist(X, wminkowski, 2, [1, 1, 1, 10])
distances_as_2d_matrix = squareform(distances)
print(distances)
print(distances_as_2d_matrix)
Calculate weighted pairwise distance matrix in Python