skbio.stats.distance.SymmetricMatrix.redundant_form#
- SymmetricMatrix.redundant_form()[source]#
Return an array of values in redundant format.
- Returns:
- ndarray
Two-dimensional array of values in redundant format.
See also
Examples
Create a symmetric matrix in condensed form and expand to square form:
>>> from skbio.stats.distance import SymmetricMatrix >>> sm = SymmetricMatrix([1, 2, 3], ids=['a', 'b', 'c'], condensed=True) >>> sm.data array([ 1., 2., 3.]) >>> sm.redundant_form() array([[ 0., 1., 2.], [ 1., 0., 3.], [ 2., 3., 0.]])