cr.sparse.cluster.vq.find_nearest

cr.sparse.cluster.vq.find_nearest(point, centroids)[source]

Returns the index of the nearest centroid for a specific point

Parameters
  • point (jax.numpy.ndarray) – A specific point

  • centroids (jax.numpy.ndarray) – An array of centroids

Returns

The index of the nearest centroid

Return type

(int)