mlx_graphs.utils.array_ops.pairwise_distances

mlx_graphs.utils.array_ops.pairwise_distances#

mlx_graphs.utils.array_ops.pairwise_distances(x: mlx.core.array, y: mlx.core.array) mlx.core.array[source]#

Compute pairwise distances between points in vectors x and y.

Parameters:
  • x (array) – array of shape (N, D)

  • y (array) – array of shape (M, D)

Return type:

array

Returns:

Array of shape (N, M)