pysolar
pysolar copied to clipboard
Some checks for Clearness index to keep ìt between 0 and 1
It seems in some scenarios i observed KT > 1
and ZeroDivisionError
. So i made changes to my own code like this. This might be helpful for others.
try:
KT = (ghi_data / EXTR1)
if KT > 1:
KT = 1
except ZeroDivisionError:
return 0
return KT
Fixed by commit 61855079. Thanks for the patch!
Sorry, had to revert this, as it broke the build.
This broke the build with this error on Python 3.4: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I suspect this could be fixed pretty easily if anyone has the inclination.