calc_te function

Calculates the Transfer Entropy for two time series