Returns True if input array is a valid distance matrix.
Distance matrices must be 2-dimensional numpy arrays containing doubles. They must have a zero-diagonal, and they must be symmetric.
Parameters : | D : ndarray
tol : float, optional
throw : bool, optional
name : str, optional
warning : bool, optional
|
---|---|
Returns : | valid : bool
|
Notes
Small numerical differences in D and D.T and non-zeroness of the diagonal are ignored if they are within the tolerance specified by tol.