Skip to content

Commit 928fac2

Browse files
tapajyoti-ghoshWesIngwersen
authored andcommitted
Do not calculate uncertainty for null amounts
1 parent c76a4bf commit 928fac2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

electricitylci/generation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,14 @@ def uncertainty_creation(data,name,fuelheat,mean,total_gen,total_facility_consid
283283
#uncertianty calculations
284284
l,b = data.shape
285285
if l > 3:
286-
287286
u,s = (uncertainty(data,mean,total_gen,total_facility_considered))
288287

289-
ar['geomMean'] = str(round(math.exp(u),12));
290-
ar['geomSd']=str(round(math.exp(s),12));
288+
if u != None:
289+
ar['geomMean'] = str(round(math.exp(u),12))
290+
ar['geomSd']=str(round(math.exp(s),12))
291+
else:
292+
ar['geomMean'] = None
293+
ar['geomSd'] = None
291294
else:
292295
ar['geomMean'] = None
293296
ar['geomSd']= None

0 commit comments

Comments
 (0)