Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/examples/shading/plot_partial_module_shading_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,13 @@ def plot_curves(dfs, labels, title):
def interpolate(df, i):
x = np.flipud(df['i'])
y = np.flipud(df['v'])

# Create a spline interpolation with linear (k=1) and extrapolation (default behavior)
spline = make_interp_spline(x, y, k=1, bc_type='clamped') # Extrapolation is handled by default


# Create a spline interpolation with
# linear (k=1) and extrapolation (default behavior)
spline = make_interp_spline(
x, y, k=1, bc_type='clamped'
) # Extrapolation is handled by default

return spline(i)


Expand Down
4 changes: 3 additions & 1 deletion pvlib/iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ def interp(aoi, theta_ref, iam_ref, method='linear', normalize=True):
theta_ref = np.asarray(theta_ref)
iam_ref = np.asarray(iam_ref)

interpolator = make_interp_spline(theta_ref, iam_ref, k=method, bc_type='clamped')
interpolator = make_interp_spline(
theta_ref, iam_ref, k=method, bc_type='clamped'
)
aoi_input = aoi

aoi = np.asanyarray(aoi)
Expand Down
1 change: 0 additions & 1 deletion pvlib/spectrum/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def get_example_spectral_response(wavelength=None):

interpolator = make_interp_spline(x_data, y_data, k=3, bc_type='clamped')


sr = pd.Series(data=interpolator(wavelength), index=wavelength)

sr.index.name = 'wavelength'
Expand Down