Created
June 14, 2020 22:01
-
-
Save jmborr/bfa24a16c3904d9d2dc52b4565f80e56 to your computer and use it in GitHub Desktop.
cluster 1000 3D points by euclidean distance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.cluster.hierarchy import fclusterdata | |
import numpy as np | |
import time | |
x = np.random.random((1000, 3)) | |
start_time = time.time() | |
fclusterdata(x, 0.001, criterion='distance', metric='euclidean', method='complete') | |
print('elapsed time =', time.time() - start_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment