scipy 1.8.0 Pypi GitHub Homepage
Other Docs
Parameters
is_valid_y(y, warning=False, throw=False, name=None)

Condensed distance matrices must be 1-dimensional numpy arrays. Their length must be a binomial coefficient ${n \choose 2}$ for some positive integer n.

Parameters

y : array_like

The condensed distance matrix.

warning : bool, optional

Invokes a warning if the variable passed is not a valid condensed distance matrix. The warning message explains why the distance matrix is not valid. :None:None:`name` is used when referencing the offending variable.

throw : bool, optional

Throws an exception if the variable passed is not a valid condensed distance matrix.

name : bool, optional

Used when referencing the offending variable in the warning or exception message.

Return True if the input array is a valid condensed distance matrix.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/spatial/distance.py#2475
type: <class 'function'>
Commit: