@@ -1927,10 +1927,10 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19271927
19281928 Parameters
19291929 ----------
1930- ghi : numeric
1930+ ghi : array-like
19311931 Global horizontal irradiance. See :term:`ghi`. [Wm⁻²]
19321932
1933- solar_zenith : numeric
1933+ solar_zenith : array-like
19341934 True (not refraction-corrected) solar zenith angles. See
19351935 :term:`solar_zenith`. [°]
19361936
@@ -1964,7 +1964,7 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19641964
19651965 Returns
19661966 -------
1967- dni : numeric or pd.Series
1967+ dni : pd.Series
19681968 Estimated direct normal irradiance. Returns float if all inputs
19691969 are scalar, pd.Series otherwise. [Wm⁻²]
19701970
@@ -1983,7 +1983,6 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
19831983 Global Horizontal to Direct Normal Insolation", Technical Report No.
19841984 SERI/TR-215-3087, Golden, CO: Solar Energy Research Institute, 1987.
19851985 """
1986- scalar_input = np .isscalar (solar_zenith )
19871986
19881987 disc_out = disc (ghi , solar_zenith , times , pressure = pressure ,
19891988 min_cos_zenith = min_cos_zenith , max_zenith = max_zenith )
@@ -2002,8 +2001,6 @@ def dirint(ghi, solar_zenith, times, pressure=101325., use_delta_kt_prime=True,
20022001 # Perez eqn 5
20032002 dni = disc_out ['dni' ] * dirint_coeffs
20042003
2005- if scalar_input :
2006- return float (dni .iloc [0 ])
20072004 return dni
20082005
20092006
@@ -2115,10 +2112,6 @@ def _dirint_bins(times, kt_prime, zenith, w, delta_kt_prime):
21152112 # Ensure scalar inputs are converted to Series so that boolean masks
21162113 # produce a boolean Series rather than a scalar bool.
21172114 # Scalar bools cause KeyError in pandas >= 2.0. GH #XXXX
2118- kt_prime = pd .Series (kt_prime , index = times , dtype = float )
2119- zenith = pd .Series (zenith , index = times , dtype = float )
2120- w = pd .Series (w , index = times , dtype = float )
2121- delta_kt_prime = pd .Series (delta_kt_prime , index = times , dtype = float )
21222115
21232116 # @wholmgren: the following bin assignments use MATLAB's 1-indexing.
21242117 # Later, we'll subtract 1 to conform to Python's 0-indexing.
0 commit comments