#NEWLINE# def _randdm( pnts ) : #NEWLINE# #INDENT# ' Generates a random distance matrix stored in condensed form. A\n        pnts * (pnts - 1) / 2 sized vector is returned.\n    ' #NEWLINE# if ( D >= 2 ) : #NEWLINE# #INDENT# D = np . random . rand ( ( ( pnts * ( pnts - 1 ) ) / 2 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'The number of points in the distance matrix must be at least 2.' ) #NEWLINE# #UNINDENT# return D