human
Give me a Python program to compute the distance between each pair of points in numpy.
assistant
Here is a Python program to compute the distance between each pair of points in numpy

import numpy as np

def distance(x, y):
    """
    Compute the distance between each pair of points in numpy.

    >>> distance([1, 2, 3], [4, 5, 6])
    [[0, 2, 2], [2, 0, 2], [2, 2, 0]]
    """
    return np.sqrt(np.sum((x - y) ** 2, axis=1))

# Enter the 2d array
array = np.array([[1,2,3],[4,5,6],[7,8,9]])

# Calling the function
print((distance(array, array)))

#Example Output
# [0. 0. 0.]

#Remember to inspect code for bugs.