Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

scipy.cluster.hierarchy.linkage docstring is confusing #3401

Closed
argriffing opened this Issue · 2 comments

3 participants

argriffing Warren Weckesser Ralf Gommers
argriffing
Collaborator

http://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html

The first couple of paragraphs say that y must be a condensed distance matrix, but the Parameters section says that y is optionally a data array. In practice the function does different things depending on the shape of y: if it appears 1d then it is treated as a condensed distance matrix, otherwise if it is 2d then it is treated as a data matrix (not as a compressed or uncompressed distance matrix). If it is not 1d or 2d then it falls off the if/elif and tries to return something that doesn't exist.

Here's the MATLAB function that hierarchy.linkage appears to try to clone:
http://www.mathworks.com/help/stats/linkage.html

Warren Weckesser
Collaborator

Duplicate? See #2614

Ralf Gommers
Owner

closing as duplicate

Ralf Gommers rgommers closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.