From 29b199ceb2c36c8dd66f8117af4c3d7122a3f548 Mon Sep 17 00:00:00 2001 From: Philipp Arras <parras@mpa-garching.mpg.de> Date: Fri, 22 Jun 2018 16:44:29 +0200 Subject: [PATCH] Cleanup --- nifty5/field.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/nifty5/field.py b/nifty5/field.py index 17a74ddcb..e8251d2b2 100644 --- a/nifty5/field.py +++ b/nifty5/field.py @@ -737,8 +737,6 @@ class Field(object): return self.isEquivalentTo(other) -COUNTER = 0 - for op in ["__add__", "__radd__", "__iadd__", "__sub__", "__rsub__", "__isub__", "__mul__", "__rmul__", "__imul__", @@ -754,12 +752,6 @@ for op in ["__add__", "__radd__", "__iadd__", if isinstance(other, Field): if other._domain != self._domain: raise ValueError("domains are incompatible.") - if (self==0).all() or (other==0).all(): - COUNTER += 1 - print("({}) zero Field detected".format(COUNTER)) - print("op = ", op) - # import traceback - # traceback.print_stack() tval = getattr(self.val, op)(other.val) return self if tval is self.val else Field(self._domain, tval) -- GitLab