changeset 448:0b15fdeb903e

bug fix for empty list of temperatures
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 05 Feb 2014 22:41:40 -0500
parents 7ef40014236c
children 1e4c1b6b0e0b
files python/pavement.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/pavement.py	Tue Feb 04 15:00:39 2014 -0500
+++ b/python/pavement.py	Wed Feb 05 22:41:40 2014 -0500
@@ -164,7 +164,7 @@
             else:
                 compteur = 0
         nbre_jours_gel_consecutifs = max(nbre_jours_gel_consecutifs,compteur)
-    if float(len(tmoys))/nDays >= minProportionMeasures:
+    if tmoys != [] and float(len(tmoys))/nDays >= minProportionMeasures:
         ecart_type_T = np.std(tmoys)
         if neige_tot < snowThreshold:
             neigeEC_sup_seuil = 0