Skip to content

Commit

Permalink
fix(metrics): Return 0 if UDI Lower threshold is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelkp committed Dec 4, 2023
1 parent 294d2fa commit 1323dad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions honeybee_radiance_postprocess/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def udi_lower_array1d(
# set total_occ to number of columns in array
total_occ = array.size

if min_t == 0:
return np.float64(0)

return np.float64(((array < min_t).sum() + sun_down_occ_hours) / total_occ * 100)


Expand Down

0 comments on commit 1323dad

Please sign in to comment.