Finally the mutual information is calculated. Tested already for a one dimensional data set. Still needs to be tested for more than one dimension. This current version will not scale well however is so simple that may also work on a big data set. It is strange that this version didn't work at all for less than 2 dimensions. Anyways I change the digitize which was giving problems and currently is working fine but still need to make changes to multidimensional code.