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

RuntimeWarning: invalid value encountered in true_divide KT = (ghi_data / EXTR1) #136

Open
mborsetti opened this issue Oct 18, 2020 · 1 comment

Comments

@mborsetti
Copy link
Contributor

mborsetti commented Oct 18, 2020

Cannot figure out what's causing this warning during testing:

[...]\pysolar\util.py:690: RuntimeWarning: invalid value encountered in true_divide
KT = (ghi_data / EXTR1)

Somehow unit testing succeeds, even though it reads ominously

@pingswept
Copy link
Owner

I’d guess that it’s a divide-by-zero error.

EXTR1 represents extraterrestrial radiation. Generally, that should be around 1366 W/m^2, so it’s probably just being tested weirdly, rather than a real bug in operation.

The line of code in question is here:

KT = (ghi_data / EXTR1)

Patches welcome from everyone, as always.

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

No branches or pull requests

2 participants