From 46bf32620cccea04376c7afdb18d28bc177a8c1f Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Sun, 13 Oct 2024 07:05:47 +0200 Subject: [PATCH] Removed unused code [ci skip] --- openquake/risklib/scientific.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/openquake/risklib/scientific.py b/openquake/risklib/scientific.py index cf22d5ef955d..7ef46dd2b816 100644 --- a/openquake/risklib/scientific.py +++ b/openquake/risklib/scientific.py @@ -1758,30 +1758,6 @@ def get_agg_value(consequence, agg_values, agg_id, xltype, time_event): raise NotImplementedError(consequence) -# ########################### u64_to_eal ################################# # - -def u64_to_eal(u64): - """ - Convert an unit64 into a triple (eid, aid, lid) - - >>> u64_to_eal(42949673216001) - (10000, 1000, 1) - """ - eid, x = divmod(u64, TWO32) - aid, lid = divmod(x, 256) - return eid, aid, lid - - -def eal_to_u64(eid, aid, lid): - """ - Convert a triple (eid, aid, lid) into an uint64: - - >>> eal_to_u64(10000, 1000, 1) - 42949673216001 - """ - return U64(eid * TWO32) + U64(aid * 256) + U64(lid) - - if __name__ == '__main__': # plots of the beta distribution in terms of mean and stddev # see https://en.wikipedia.org/wiki/Beta_distribution