let mean = match topology_boundary with
| Periodic -> Measure.Statistic.mean_float
| Bounded ->
fun array ->
let sum, nb = Array.fold_left
(fun ((sum, nb) as accu) x ->
if x = -1. then accu else sum +. x, succ nb) (0.,0) array in
sum /. float nb