-
Notifications
You must be signed in to change notification settings - Fork 1.1k
_golden_sect_DataFrame changes in 0.9.4 #1780
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
Comments
See #1673 |
@cedricleroy can you provide the inputs and function call that produced the negative |
@echedey-ls Thanks! I thought I checked for related issues, but apparently not enough 😄 @cwhanse Sure thing: Running
|
Agree this is not desirable. My thoughts:
|
1/ makes sense to me. I agree with the CONS for 2/ and 3/ Happy to open a PR with 1. if that helps. |
That is welcome. Because I'm cautious about junk values with larger magnitude being covered up by 0s, maybe
|
Describe the bug
0.9.4
introduced the following changes in the_golden_sect_DataFrame
: We are checkingupper
andlower
parameters and raise an error iflower > upper
.pvlib-python/pvlib/tools.py
Lines 344 to 345 in 81598e4
_golden_sect_DataFrame
is used by_lambertw
:pvlib-python/pvlib/singlediode.py
Lines 644 to 649 in 81598e4
I often have slightly negative
v_oc
values (really close to 0) when running simulations (second number in the array below):If we have one negative number in a large timeseries, the simulation will crash which seems too strict.
Expected behavior
That would be great to either:
_lambertw
: Do not allow negativev_oc
and set negative values tonp.nan
, so that the error is not triggered. It will be up to the upstream code (user) to manage thosenp.nan
.Versions:
pvlib.__version__
: >= 0.9.4pandas.__version__
: 1.5.3The text was updated successfully, but these errors were encountered: