LingPy

lingpy.algorithm.misc.squareform

lingpy.algorithm.misc.squareform(x)

A simplified version of the scipy.spatial.distance.squareform() function.

Parameters :

x : numpy.array or list

The one-dimensional flat representation of a symmetrix distance matrix.

Returns :

matrix : numpy.array

The two-dimensional redundant representation of a symmetric distance matrix.