def distance_matrix(x, y, p=2, threshold=1000000):

    x = np.asarray(x)
    m, k = x.shape
    y = np.asarray(y)
    n, kk = y.shape

    if k != kk:
        raise ValueError("x contains %d-dimensional vectors but y contains %d-dimensional vectors" % (k, kk))

    if m*n*k <= threshold:
        return minkowski_distance(x[:,np.newaxis,:],y[np.newaxis,:,:],p)
    else:
        result = np.empty((m,n),dtype=float)  # FIXME: figure out the best dtype
        if m < n:
            for i in range(m):
                result[i,:] = minkowski_distance(x[i],y,p)
        else:
            for j in range(n):
                result[:,j] = minkowski_distance(x,y[j],p)
        return result
View that checks the hash in a password reset link and presents a
dataset/ETHPy150Open scipy/scipy/scipy/spatial/kdtree.py/distance_matrix--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/auth/views.py/password_reset_confirm