Skip to content

avoid and/or silence common warnings #428

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

Closed
8 tasks done
wholmgren opened this issue Feb 14, 2018 · 1 comment
Closed
8 tasks done

avoid and/or silence common warnings #428

wholmgren opened this issue Feb 14, 2018 · 1 comment
Milestone

Comments

@wholmgren
Copy link
Member

wholmgren commented Feb 14, 2018

A handful of pvlib functions often cause spit out runtime warnings for things like dividing by 0 or comparing the size of a nan value to a float. We should avoid or silence the warnings that we know are ok. They also make the test output a pain to read.

Here's a possibly incomplete list:

  • irradiance.perez divide by 0
  • irradiance.perez comparison with nan
  • clearsky.simplified_solis comparison with nan
  • pvsystem.sapm divide by 0 in log
  • pvsystem.ashraeiam comparison with nan
  • pvsystem.physicaliam comparison with nan
  • pvsystem.adrinverter comparison with nan
  • pvsystem.v_from_i overflow

I have some code ready for addressing the warnings in the perez model implementation. I'll post it soon.

Checked items are addressed in #429.

@adriesse
Copy link
Member

I think the readability of the code suffers (in terms of being able to quickly see what math is being done) with some of the changes you propose. I sometimes disable certain warnings at the start of my scripts when they get on my nerves. Could that be adequate for other users? This suggestion could be put in the doc string for functions that are particularly annoying.

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