Open fabiotrovato opened 5 years ago
It is likely an error with newer version of pandas. Unless you are using a very old pandas version, the problem is here:
387 df['stream'] = pd.Categorical.from_codes(A_ch, categories=["DexDem", "DexAem"])
pandas does not like the argument A_ch
, probably a bool array. Try to change it to A_ch.astype('uint8')
or to something that pandas accepts.
I am not sure what you're suggesting. Are you suggesting to hack your code and add A_ch.astype('uint8') somewhere? Which pandas version was used to test the notebook? My pandas version is pandas==0.24.1. I followed the instructions for installing depi, to meet the various dependencies (pandas >= 0.22).
If I add A_ch.astype('uint8') in _set_ph_stream_column(df, A_ch) of depi.py I still get the same error. Thanks.
Yes, this software served to demonstrate the idea of the DEPI paper. I don't have the resources to support it with evolving versions of the python ecosystems. You can find the original environment here:
https://github.com/tritemio/mcdepi2018-paper-analysis/blob/master/binder/environment.yml
it says that pandas 0.22 was used, so there must be a breaking change in pandas 0.24.
Everything here is opensource, all the versions of the packages used at that time are captured in the environment file and data files are available on figshare. You can even run the analysis online by clicking on the mybinder button!
Feel free to take the source and develop/fix it in any direction may fits you, follow the MIT license (acknowledge original author) and please share back.
Hi,
I am trying to execute the notebook Burst Analysis-DEPI-sim2-E_nanotime.ipynb, but I get the following error at:
rg = RandomGenerator(Xoroshiro128(1)) burstsph_sim = depi.recolor_burstsph(burstsph_sel.loc[Dex, 'timestamp'], rg=rg, **params)
Any idea how I could solve this issue? Thank you, Fabio