Skip to content

Commit 25b9f27

Browse files
committed
Change OrderedDict to Dict
1 parent 379d1f8 commit 25b9f27

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

pvlib/irradiance.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
783783
784784
Returns
785785
--------
786-
numeric, OrderedDict, or DataFrame
786+
numeric, Dict, or DataFrame
787787
Return type controlled by ``return_components`` argument.
788788
If `False`, ``sky_diffuse`` is returned.
789789
If `True`, ``diffuse_components`` is returned.
@@ -792,7 +792,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
792792
The sky diffuse component of the solar radiation on a tilted
793793
surface. [Wm⁻²]
794794
795-
diffuse_components : OrderedDict (array input) or DataFrame (Series input)
795+
diffuse_components : Dict (array input) or DataFrame (Series input)
796796
Keys/columns are:
797797
* poa_sky_diffuse: Total sky diffuse
798798
* poa_isotropic
@@ -855,12 +855,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
855855
sky_diffuse = poa_isotropic + poa_circumsolar
856856

857857
if return_components:
858-
diffuse_components = OrderedDict()
859-
diffuse_components['poa_sky_diffuse'] = sky_diffuse
860-
861-
# Calculate the individual components
862-
diffuse_components['poa_isotropic'] = poa_isotropic
863-
diffuse_components['poa_circumsolar'] = poa_circumsolar
858+
diffuse_components = {
859+
'poa_sky_diffuse': sky_diffuse,
860+
'poa_isotropic': poa_isotropic,
861+
'poa_circumsolar': poa_circumsolar
862+
}
864863

865864
if isinstance(sky_diffuse, pd.Series):
866865
diffuse_components = pd.DataFrame(diffuse_components)

0 commit comments

Comments
 (0)