From 040f6dbd51a627ae53796f8b7c1951e93cf11a67 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 18 Oct 2021 13:31:57 +0100 Subject: [PATCH] Added tag attribute to CObs, added __slots__ to CObs, decreasing memory footprint --- pyerrors/pyerrors.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyerrors/pyerrors.py b/pyerrors/pyerrors.py index a1f18491..0e8bfeb4 100644 --- a/pyerrors/pyerrors.py +++ b/pyerrors/pyerrors.py @@ -641,9 +641,11 @@ class Obs: class CObs: + __slots__ = ['real', 'imag', 'tag'] def __init__(self, real, imag=0.0): self.real = real self.imag = imag + self.tag = None def gamma_method(self, **kwargs): if isinstance(self.real, Obs):