Skip to content

Instantly share code, notes, and snippets.

@satra
satra / distcorr.py
Created October 16, 2014 15:40
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])