Skip to main content
`Ctrl`+`K`

# skbio.stats.distance.SymmetricMatrix.redundant_form

SymmetricMatrix.redundant_form()

  Return an array of values in redundant format.

  Returns:
    ndarray

      Two-dimensional array of values in redundant format.

  See also

  `as_redundant`
  `condensed_form`
  `as_condensed`

  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.]])