Skip to content

Commit c3c1f9e

Browse files
committed
add mode kwarg for np.pad
1 parent 9387067 commit c3c1f9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pvlib/clearsky.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,8 @@ def _get_sample_intervals(times, win_length):
674674

675675

676676
def _to_centered_series(vals, idx, H, samples_per_window):
677-
vals = np.pad(vals, ((0, len(idx) - H.shape[1]),), constant_values=np.nan)
677+
vals = np.pad(vals, ((0, len(idx) - H.shape[1]),), mode='constant',
678+
constant_values=np.nan)
678679
shift = samples_per_window // 2 # align = 'center' only
679680
return pd.Series(index=idx, data=vals).shift(shift)
680681

0 commit comments

Comments
 (0)