Skip to main content
`Ctrl`+`K`
scipy.spatial.distance.

# num_obs_y

scipy.spatial.distance.num_obs_y(Y)

  Return the number of original observations that correspond to a condensed distance matrix.

  Parameters:
    Y array_like

      Condensed distance matrix.

  Returns:
    n int

      The number of observations in the condensed distance matrix Y.

  Examples

  Find the number of original observations corresponding to a condensed distance matrix Y.

      >>> from scipy.spatial.distance import num_obs_y
      >>> Y = [1, 2, 3.5, 7, 10, 4]
      >>> num_obs_y(Y)
      4