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

Fisheries-HST FloatingPointError: invalid value encountered in true_divide #18

Closed
phargogh opened this issue Feb 13, 2020 · 0 comments · Fixed by #432
Closed

Fisheries-HST FloatingPointError: invalid value encountered in true_divide #18

phargogh opened this issue Feb 13, 2020 · 0 comments · Fixed by #432
Labels
bug Something isn't working question Further information is requested

Comments

@phargogh
Copy link
Member

This sometimes causes our tests to fail (https://ci.appveyor.com/project/davemfish/invest/builds/28437818/job/y1psai9ejk8h2htg)

It's clear what the problem is, but unclear what the correct scientific solution is.

fisheries_hst.py line 144 divides by array n_a, which is populated by a user-input matrix of 1s and 0s (see lines 109, 110 for n_a, and trace it back to the user input in fisheries_hst_io.py)

fisheries_hst.pyline 110 is especially suspicious: n_a[n_a == 0] = 0

Originally reported by @davemfish at https://bitbucket.org/natcap/invest/issues/3925/fisheries-hst-floatingpointerror-invalid

@phargogh phargogh added bug Something isn't working question Further information is requested labels Feb 13, 2020
emlys added a commit to emlys/invest that referenced this issue Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant