neurodata / mgcpy-old

MGCPY WILL NO LONGER BE UPDATED. THE NEW REPO CAN BE FOUND HERE:
https://github.com/neurodata/hyppo
Apache License 2.0
31 stars 45 forks source link

type error in - mgcpy.independence_tests.mgc_utils.local_correlation.local_covariance " -expected 'int_t' but got 'long long'" #160

Open benfreoa opened 5 years ago

benfreoa commented 5 years ago

mgc function is not working and I can't change the type in "local_correlation.cp37-win_amd64.pyd".

I tried :

mgc = MGC() mgc_statistic , independence_test_metadata = mgc.test_statistic(X,Y)

and i have this error message :

File "mgcpy\independence_tests\mgc_utils\local_correlation.pyx", line 83, in mgcpy.independence_tests.mgc_utils.local_correlation.local_correlations

File "mgcpy\independence_tests\mgc_utils\local_correlation.pyx", line 138, in mgcpy.independence_tests.mgc_utils.local_correlation.local_correlations

File "mgcpy\independence_tests\mgc_utils\local_correlation.pyx", line 16, in mgcpy.independence_tests.mgc_utils.local_correlation.local_covariance

ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'

I use Windows 10 & Python 3.7

sampan501 commented 5 years ago

Sorry for getting back late, but we just updated mgcpy to 0.4.0. Does it work now?

cshen6 commented 5 years ago

@sampan501 I was told by a student trying mgcpy to have the same bug just yesterday. looks like just change the type to long will fix this bug?

benfreoa commented 5 years ago

Hi,

@sampan501 , sorry for the delay. I tried to update in pyhton but it seems that pyhton didn't find a new version 0.4.0. I tried to upgrade and I tried to fix the new version "pip install mgcpy==0.4.0", it was the same. the new version is already available ?

sampan501 commented 5 years ago

Are you using Mac OS Mojave or Linux? For Mac OS pip install --upgrade mgcpy should work, but for linux, follow this:

git clone https://github.com/neurodata/mgcpy
cd mgcpy
python3 setup.py build_ext --inplace
sampan501 commented 5 years ago

A fix for the long error should be in the next version

MaxKerney commented 5 years ago

Could you give us an idea of when the next version will be released?

sampan501 commented 5 years ago

ETA on that should be sometime within the next month. I've looking at this more closely, it seems though that it may be a compiler error. Cython code needs to be compiled before running. I will update the ReadMe with install instructions for this, but for now instructions for installation are here https://wiki.python.org/moin/WindowsCompilers.

MaxKerney commented 5 years ago

I've tried following those instructions but still no joy unfortunately.