Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(metrics): Return 0 if UDI Lower threshold is 0 #147

Merged
merged 1 commit into from Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions honeybee_radiance_postprocess/metrics.py
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