pik-copan / pyunicorn

Unified Complex Network and Recurrence Analysis Toolbox
http://pik-potsdam.de/~donges/pyunicorn/
Other
195 stars 87 forks source link

long-int in mutual_info.py #44

Closed ntfrgl closed 9 years ago

ntfrgl commented 9 years ago

by executing pyunicorn-tutorial and using the mutual info to create a network error occured. I tracked it down to climate/mutual_info.py:

-In the _weave_calculate_mutual_information function is the bug hidden:

    In line 279 are variables declared as long integers
    BUT in the code calculated from the variable "symbolic" (see line 293)
    This variable "symbolic" is input from the python via weave to the c-code (line 440)
    And seems to be treated as an integer (NOT as long)

My workaround: I changed the 'long' to 'int' in lines 273, 279. I don't know if the change in 273 is necessary.


Originally reported by: pklamser Originally created on: 2014-09-09

ntfrgl commented 9 years ago

Fixed in daf187eb1c51acc7bdabc95000f1552ecb7ffacf.