Skip to content

Put back tvb.analyzers.info

Marmaduke Woodman requested to merge tvb-analyzers-info into master

Created by: liadomide

Last year, when we ensured TVB becomes compatible with Python 3, we removed tvb.analyzers.info module, as it was not working with recent numpy and python versions, and we thought it is also not used. I think we made a mistake in judgment. The module was part of TVB api, and is even referred in one of the Tutorials (true, from the "sandbox" folder).

I am thinking to put the module back. But then, we will need to also adapt the code. Currently there is a problem at line 87: File "...tvb-root/scientific_library/tvb/analyzers/info.py", line 87, in sampen y = y[:y.shape[0] / taus * taus].reshape((-1, taus)).mean(axis=1) TypeError: slice indices must be integers or None or have an __index__ method If I edit that line into: y = y[:int(y.shape[0] / taus * taus)].reshape((-1, taus)).mean(axis=1) Then the error becomes: ValueError: cannot reshape array of size 29999 into shape (7)

@maedoc Could you pls have a quick look, and advice how to proceed further?

Merge request reports