Skip to content

Commit 80ae94e

Browse files
committed
Fix docstrings
1 parent dd9cb4e commit 80ae94e

2 files changed

Lines changed: 16 additions & 14 deletions

File tree

pvlib/irradiance.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -916,16 +916,16 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
916916
solar_azimuth : numeric
917917
Solar azimuth angles. See :term:`solar_azimuth`. [°]
918918
919-
return_components : bool, default False
920-
Flag used to decide whether to return the calculated diffuse components
921-
or not.
919+
return_components : bool, default ``False``
920+
If ``False``, ``sky_diffuse`` is returned.
921+
If ``True``, ``diffuse_components`` is returned.
922922
923923
Returns
924924
-------
925925
numeric, Dict, or DataFrame
926926
Return type controlled by ``return_components`` argument.
927-
If ``return_components=False``, `sky_diffuse` is returned.
928-
If ``return_components=True``, `diffuse_components` is returned.
927+
If ``return_components=False``, ``sky_diffuse`` is returned.
928+
If ``return_components=True``, ``diffuse_components`` is returned.
929929
930930
sky_diffuse : numeric
931931
The sky diffuse component of the solar radiation on a tilted
@@ -964,8 +964,8 @@ def reindl(surface_tilt, surface_azimuth, dhi, dni, ghi, dni_extra,
964964
brightening, so the form of the equation varies slightly from Equation 8
965965
in [3]_.
966966
967-
For clarity, the horizon component in `reindl` corresponds to the term
968-
added on top of the `haydavies` formulation, on which `reindl` builds.
967+
For clarity, the horizon component in ``reindl`` corresponds to the term
968+
added on top of the ``haydavies`` formulation, on which ``reindl`` builds.
969969
970970
References
971971
----------

tests/test_irradiance.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,18 +270,20 @@ def test_reindl_components(irrad_data, ephem_data, dni_et):
270270
assert_frame_equal(result, expected, check_less_precise=4)
271271
# numpy
272272
result = irradiance.reindl(
273-
40, 180, irrad_data['dhi'].values, irrad_data['dni'].values,
274-
irrad_data['ghi'].values, dni_et, ephem_data['apparent_zenith'].values,
275-
ephem_data['azimuth'].values, return_components=True)
273+
40, 180, irrad_data['dhi'].to_numpy(), irrad_data['dni'].to_numpy(),
274+
irrad_data['ghi'].to_numpy(), dni_et,
275+
ephem_data['apparent_zenith'].to_numpy(),
276+
ephem_data['azimuth'].to_numpy(), return_components=True)
276277
for key in keys:
277278
assert_allclose(result[key], expected[key], atol=1e-4)
278279
assert isinstance(result, dict)
279280
# scalar
280281
result = irradiance.reindl(
281-
40, 180, irrad_data['dhi'].values[-1], irrad_data['dni'].values[-1],
282-
irrad_data['ghi'].values[-1], dni_et[-1],
283-
ephem_data['apparent_zenith'].values[-1],
284-
ephem_data['azimuth'].values[-1],
282+
40, 180, irrad_data['dhi'].to_numpy()[-1],
283+
irrad_data['dni'].to_numpy()[-1],
284+
irrad_data['ghi'].to_numpy()[-1], dni_et[-1],
285+
ephem_data['apparent_zenith'].to_numpy()[-1],
286+
ephem_data['azimuth'].to_numpy()[-1],
285287
return_components=True)
286288
for key in keys:
287289
assert_allclose(result[key], expected[key].iloc[-1], atol=1e-4)

0 commit comments

Comments
 (0)