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

Some checks for Clearness index to keep ìt between 0 and 1 #103

Open
raghu1121 opened this issue Feb 17, 2019 · 2 comments
Open

Some checks for Clearness index to keep ìt between 0 and 1 #103

raghu1121 opened this issue Feb 17, 2019 · 2 comments

Comments

@raghu1121
Copy link
Contributor

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 
@pingswept
Copy link
Owner

pingswept commented Feb 22, 2019

Fixed by commit 6185507. Thanks for the patch!

@pingswept
Copy link
Owner

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.

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