Skip to content

Commit 8069470

Browse files
committed
clip to [-1, 1]
1 parent dc617d0 commit 8069470

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pvlib/irradiance.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ def aoi_projection(surface_tilt, surface_azimuth, solar_zenith, solar_azimuth):
182182
tools.sind(surface_tilt) * tools.sind(solar_zenith) *
183183
tools.cosd(solar_azimuth - surface_azimuth))
184184

185+
# GH 1185
186+
projection = np.clip(projection, -1, 1)
187+
185188
try:
186189
projection.name = 'aoi_projection'
187190
except AttributeError:

0 commit comments

Comments
 (0)