def num_obs_linkage(Z):
 Z = np.asarray(Z, order='c')
 is_valid_linkage(Z, throw=True, name='Z')
 return (Z.shape[0] + 1)

def num_obs_linkage ( Z ) : Z = np . asarray ( Z , order = 'c' ) is_valid_linkage ( Z , throw = True , name = 'Z' ) return ( Z . shape [ 0 ] + 1 )
returns the number of original observations of the linkage matrix passed .