Skip to content

Fix flake8-linter issues in PR #2401: resolve W293, E501, and E303 er… #1

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

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