From 4f7b5d23ae2dc83c399cbde69caaa61162151964 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 18 Oct 2021 10:28:08 +0100 Subject: [PATCH] __slots__ added to Obs to reduce the memory footprint of individual objects and slightly speed up the initialisation of an object --- pyerrors/pyerrors.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index 4f8cc9bf..55e40d48 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -35,6 +35,10 @@ class Obs: ensemble. N_sigma_global -- Standard value for N_sigma (default 1.0) """ + __slots__ = ['names', 'shape', 'r_values', 'deltas', 'N', 'value', 'dvalue', + 'ddvalue', 'reweighted', 'S', 'tau_exp', 'N_sigma', 'e_names', + 'e_content', 'e_dvalue', 'e_ddvalue', 'e_tauint', 'e_dtauint', + 'e_windowsize', 'e_rho', 'e_drho', 'e_n_tauint', 'e_n_dtauint'] e_tag_global = 0 S_global = 2.0