-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Milestone
Description
The clear-sky docs page has an issue:
In [156]: clear_samples = clearsky.detect_clearsky(ghi, cs['ghi'], cs.index, 10)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-156-a86cb0f5cb3e> in <module>
----> 1 clear_samples = clearsky.detect_clearsky(ghi, cs['ghi'], cs.index, 10)
~/checkouts/readthedocs.org/user_builds/pvlib-python/checkouts/stable/pvlib/clearsky.py in detect_clearsky(measured, clearsky, times, infer_limits, window_length, mean_diff, max_diff, lower_line_length, upper_line_length, var_diff, slope_dev, max_iterations, return_components)
823 if len(times) < samples_per_window:
824 raise ValueError(f"times has only {len(times)} entries, but it must \
--> 825 have at least {samples_per_window} entries")
826
827 # generate matrix of integers for creating windows with indexing
ValueError: times has only 30 entries, but it must have at least 50 entriesPresumably the problem is that this code is passing the value 10 by position to the new infer_limits parameter added in #1784 instead of to window_length like it used to. I expect it would be fixed by editing that line in clearsky.rst to specify the parameter by name: window_length=10.