gwastro / sbank

GNU General Public License v2.0
4 stars 14 forks source link

TypeError: 'float' object cannot be interpreted as an integer #22

Closed MariaAssiduo closed 3 years ago

MariaAssiduo commented 3 years ago

Hi,

Running the new SBank code, I get the following error:

Traceback (most recent call last):
  File "/home/maria.assiduo/gwastro/sbank_Python3/bin/sbank", line 527, in <module>
    for tmplt in proposal:
  File "/home/maria.assiduo/gwastro/sbank_Python3/lib/python3.6/site-packages/sbank/tau0tau3.py", line 551, in aligned_spin_param_generator
    for mass1, mass2 in urand_tau0tau3_generator(flow, **kwargs):
  File "/home/maria.assiduo/gwastro/sbank_Python3/lib/python3.6/site-packages/sbank/tau0tau3.py", line 398, in urand_tau0tau3_generator
    lims_tau0, lims_tau3 = tau0tau3_bound(flow, **constraints)
  File "/home/maria.assiduo/gwastro/sbank_Python3/lib/python3.6/site-packages/sbank/tau0tau3.py", line 269, in tau0tau3_bound
    m1m2_points = [(m1, m2min) for m1 in numpy.linspace(m1min, m1max, npts)]
  File "<__array_function__ internals>", line 6, in linspace
  File "/home/maria.assiduo/gwastro/sbank_Python3/lib/python3.6/site-packages/numpy/core/function_base.py", line 113, in linspace
    num = operator.index(num)
TypeError: 'float' object cannot be interpreted as an integer

Any suggestions to fix this? Thanks in advance.

MariaAssiduo commented 3 years ago

Seems that the solution is here: https://github.com/gwastro/sbank/commit/a0f5d82252da0af2a02df848822792238867c4ef