DistanceMatrix.from_iterable(iterable, metric, key=None, keys=None)[source]¶Create DistanceMatrix from all pairs in an iterable given a metric.
State: Experimental as of 0.4.1.
| Parameters: | iterable : iterable
metric : callable
key : callable or metadata key, optional
keys : iterable, optional
|
|---|---|
| Returns: | DistanceMatrix
|
| Raises: | ValueError
|
Notes
Symmetry and hollowness are assumed when calculating the distances via metric. Therefore, distances are only computed for the strictly upper/lower triangle.