Skip to content

Commit 4a425a3

Browse files
committed
Fix docstrings
1 parent 97a34f6 commit 4a425a3

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

pvlib/irradiance.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,18 @@ def isotropic(surface_tilt, dhi, return_components=False):
624624
Diffuse horizontal irradiance, must be >=0. See :term:`dhi`.
625625
626626
return_components : bool, default `False`
627-
If `False`, ``sky_diffuse`` is returned.
628-
If `True`, ``diffuse_components`` is returned.
629-
For this model, return_components does not add more information,
627+
If ``False``, ``sky_diffuse`` is returned.
628+
If ``True``, ``diffuse_components`` is returned.
629+
For this model, ``return_components`` does not add more information,
630630
but it is included for consistency with the other sky diffuse models.
631631
632632
Returns
633633
-------
634-
numeric, Dict, or DataFrame
635-
Return type controlled by ``return_components`` argument.
636-
If `False`, ``sky_diffuse`` is returned.
637-
If `True`, ``diffuse_components`` is returned.
638-
639-
sky_diffuse : numeric
634+
sky_diffuse : numeric (if ``return_components`` is ``False``)
640635
The sky diffuse component of the solar radiation. [Wm⁻²]
641636
642637
diffuse_components : Dict (array input) or DataFrame (Series input)
638+
(if ``return_components`` is ``True``)
643639
Keys/columns are:
644640
* poa_sky_diffuse: Total sky diffuse
645641
* poa_isotropic

tests/test_irradiance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ def test_isotropic_components(irrad_data):
182182
assert_frame_equal(result, expected, check_less_precise=4)
183183
# numpy
184184
result = irradiance.isotropic(
185-
40, irrad_data['dhi'].values, return_components=True)
185+
40, irrad_data['dhi'].to_numpy(), return_components=True)
186186
for key in keys:
187187
assert_allclose(result[key], expected[key], atol=1e-4)
188188
assert isinstance(result, dict)
189189
# scalar
190190
result = irradiance.isotropic(
191-
40, irrad_data['dhi'].values[-1], return_components=True)
191+
40, irrad_data['dhi'].to_numpy()[-1], return_components=True)
192192
for key in keys:
193193
assert_allclose(result[key], expected[key].iloc[-1], atol=1e-4)
194194
assert isinstance(result, dict)

0 commit comments

Comments
 (0)