def cosine_distances(X, Y=None):
    # 1.0 - cosine_similarity(X, Y) without copy
    S = cosine_similarity(X, Y)
    S *= -1
    S += 1
    return S


# Paired distances
Compute cosine distance between samples in X and Y.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/pairwise.py/cosine_distances