Skip to content

Commit ead558d

Browse files
committed
STY: fix line length and blank lines in dirint docstring
1 parent dd4ab10 commit ead558d

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

pvlib/irradiance.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def _handle_extra_radiation_types(datetime_or_doy, epoch_year):
132132
# a better way to do it.
133133
if isinstance(datetime_or_doy, pd.DatetimeIndex):
134134
to_doy = tools._pandas_to_doy # won't be evaluated unless necessary
135-
def to_datetimeindex(x): return x # noqa: E306
135+
136+
def to_datetimeindex(x):
137+
return x # noqa: E306
136138
to_output = partial(pd.Series, index=datetime_or_doy)
137139
elif isinstance(datetime_or_doy, pd.Timestamp):
138140
to_doy = tools._pandas_to_doy
@@ -146,12 +148,14 @@ def to_datetimeindex(x): return x # noqa: E306
146148
tools._datetimelike_scalar_to_datetimeindex
147149
to_output = tools._scalar_out
148150
elif np.isscalar(datetime_or_doy): # ints and floats of various types
149-
def to_doy(x): return x # noqa: E306
151+
def to_doy(x):
152+
return x # noqa: E306
150153
to_datetimeindex = partial(tools._doy_to_datetimeindex,
151154
epoch_year=epoch_year)
152155
to_output = tools._scalar_out
153156
else: # assume that we have an array-like object of doy
154-
def to_doy(x): return x # noqa: E306
157+
def to_doy(x):
158+
return x # noqa: E306
155159
to_datetimeindex = partial(tools._doy_to_datetimeindex,
156160
epoch_year=epoch_year)
157161
to_output = tools._array_out
@@ -1969,9 +1973,9 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19691973
19701974
Notes
19711975
-----
1972-
DIRINT model requires time series data (ie. one of the inputs must
1973-
The DIRINT model was developed for time series data with length > 2. The implementation
1974-
in pvlib assumes the data are periodic which may affect the first and last DNI values.
1976+
The DIRINT model was developed for time series data with length > 2.
1977+
The implementation in pvlib assumes the data are periodic which may
1978+
affect the first and last DNI values.
19751979
19761980
References
19771981
----------
@@ -1984,7 +1988,6 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19841988
SERI/TR-215-3087, Golden, CO: Solar Energy Research Institute, 1987.
19851989
"""
19861990

1987-
19881991
disc_out = disc(ghi, solar_zenith, times, pressure=pressure,
19891992
min_cos_zenith=min_cos_zenith, max_zenith=max_zenith)
19901993
airmass = disc_out['airmass']

0 commit comments

Comments
 (0)