Numpy-Neuron / cluster /distance.py
Jensen-holm's picture
getting rid of some more problematic type hints
0e83192
raw
history blame
429 Bytes
import numpy as np
# right now I am not using this function
# maybe get rid of it or change it to how we
# use it in our distance calculations
def euclidean(
point: np.array,
data: np.array,
):
"""
Computed the euclidean distance
between a point and the rest
of the dataset
point dims: (m,)
data dims: (n, m)
output dims: (n,)
"""
return np.sqrt(np.sum((point - data)**2), aixs=1)