mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr
This commit is contained in:
commit
3805cc9932
5 files changed
+77
-12
No files matched your search
@@ -25,7 +25,7 @@ from copy import deepcopy
|
||||
from operator import itemgetter
|
||||
from functools import reduce
|
||||
|
||||
from tools import flatten, timer, trace
|
||||
from tools import flatten, timer, trace, logger_exception
|
||||
|
||||
from Model.Tools.PamhyrDB import SQLSubModel
|
||||
|
||||
@@ -697,10 +697,14 @@ class Reach(SQLSubModel):
|
||||
logger.debug(f"+{incline_acc}")
|
||||
logger.debug(f"-{incline_set}")
|
||||
|
||||
return (
|
||||
reduce(
|
||||
lambda acc, x: acc + x,
|
||||
incline_set,
|
||||
0.0
|
||||
) / (len(incline_set))
|
||||
)
|
||||
try:
|
||||
return (
|
||||
reduce(
|
||||
lambda acc, x: acc + x,
|
||||
incline_set,
|
||||
0.0
|
||||
) / (len(incline_set))
|
||||
)
|
||||
except Exception as e:
|
||||
logger_exception(e)
|
||||
return 0
|
||||
Reference in new issue
Block a user