Introduction to Python packages – scipy

The submodule from the scipy package is called scipy.cluster. With the following code, we can find all embedded functions. The document for this submodule is available here at https://docs.scipy.org/doc/scipy/reference/cluster.hierarchy.html:

import scipy.cluster as cluster 
x=dir(cluster) 
print(x) 

The next screenshot shows the related output:

First, we use the scipy.cluster._hierarchy function. This example is borrowed as well (https://stackoverflow.com/questions/21638130/tutorial-for-scipy-cluster-hierarchy). The code is shown here:

import numpy as np import matplotlib.pyplot as plt import scipy.cluster.hierarchy ...

Get Hands-On Data Science with Anaconda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.