Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in numpy called from BH.BHAccHistogram #146

Open
trquinn opened this issue May 7, 2021 · 0 comments
Open

TypeError in numpy called from BH.BHAccHistogram #146

trquinn opened this issue May 7, 2021 · 0 comments

Comments

@trquinn
Copy link
Contributor

trquinn commented May 7, 2021

When running tangos write BH_mass BH_mdot_histogram --for h102054gs --type bh
I get the following exception. It looks like a conversion from float to int is needed for the last argument to np.linspace(). This is with numpy version 1.20.2.

Uncaught exception during property calculation <tangos.properties.pynbody.BH.BHAccHistogram object at 0x15552e88fb80> applied to <BH 'h102054gs/h102054gs.004096/BH_238728098' | NDM=0 Nstar=0 Ngas=0> Traceback (most recent call last): File "/home/u14266/.local/lib/python3.8/site-packages/tangos-1.1.1-py3.8.egg/tangos/tools/property_writer.py", line 382, in _get_property_value result = property_calculator.calculate(snapshot_data, db_data) File "/home/u14266/.local/lib/python3.8/site-packages/tangos-1.1.1-py3.8.egg/tangos/properties/pynbody/BH.py", line 125, in calculate t_grid = np.linspace(0, grid_tmax_Gyr, nbins) File "<__array_function__ internals>", line 5, in linspace File "/home/u14266/.local/lib/python3.8/site-packages/numpy/core/function_base.py", line 120, in linspace num = operator.index(num) TypeError: 'float' object cannot be interpreted as an integer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant