topo.base.dists

Efficient distance computations used throughout the package.

Only a small subset of the original UMAP distance functions are kept here: euclidean, poincare and cosine distances together with their gradients. The implementations favour vectorised numpy operations and numba’s JIT compilation for speed. A few convenience functions for pairwise distance computation are also provided and make use of numba’s parallelisation when available.

Attributes

_have_numba

Functions

euclidean(x, y)

Standard Euclidean distance.

Module Contents

topo.base.dists._have_numba = True
topo.base.dists.euclidean(x, y)

Standard Euclidean distance.