Calculate the sum over a list of minima of two vectors I have the following metric:

def d(x, y):
    """The metric."""
    return 1 - sum(min(xi, yi) for xi, yi in zip(x, y))


where x and y are numpy arrays of equal length (~3000). I know that the elements of x and the elements of y each sum up to 1 and are non-negative.

Can this be calculated faster?
Minimum calculation could be vectorized:

import numpy as np

def f(x, y):
    return 1 - np.minimum(x, y).sum()