I was having a problem with SpecifySparseModel and found a fix, but I’d like to make sure I’m not messing something up down the line. I’d previously been using nipype v 0.10.0 with no problem, and recently upgraded to v 0.12.1
When using SpecifySparseModel, I get the error on line 655 of modelgen.py
boxcar = np.zeros((50.0 * 1e3 / dt))
TypeError: 'float' object cannot be interpreted as an index
Earlier in the modelgen.py script, I noticed that in the newer version (line 643) explicitly declares variable dt to be a float, i.e.:
`dt = float(gcd(dttemp, dt))`
In the older version of nipype, there was no explicit declaration. Since it seems my version of python doesn’t seem to like a float as an index, I changed the float declaration to int, and everything works just fine.
So my question is: Was there a reason for the explicit float declaration? Am I messing something up further down the pipeline with this change? (Clearly python is not my forte, so apologies if there is an obvious answer.)
@jenns this error has to do with another python package we depend on - numpy - upgrading their code. We’ve since then patched the problem in our latest master branch on github, and will be releasing v0.13.0 shortly. Hope this helps!