Skip to content

Instantly share code, notes, and snippets.

View nikhilRP's full-sized avatar
🏠
Working from home

Nikhil R Podduturi nikhilRP

🏠
Working from home
  • BI X - The Digital Lab for Boehringer Ingelheim
  • Ingelheim am Rhein, Germany
View GitHub Profile
@nikhilRP
nikhilRP / distanceCorrelation.py
Created January 4, 2017 17:34
Distance correlation
from scipy.spatial.distance import pdist, squareform
import numpy as np
def distcorr(X, Y):
""" Compute the distance correlation function
"""
X = np.atleast_1d(X)
Y = np.atleast_1d(Y)
if np.prod(X.shape) == len(X):