From 448566724fbd8793ada4a7e6d44a0a1d4f2530ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Mart=C3=ADnez=20Lema?= Date: Tue, 28 Jul 2026 09:44:47 +0000 Subject: [PATCH 1/2] Use Cluster.empty instead of NNN --- invisible_cities/cities/components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invisible_cities/cities/components.py b/invisible_cities/cities/components.py index 751b43b8a..5ec7e906d 100644 --- a/invisible_cities/cities/components.py +++ b/invisible_cities/cities/components.py @@ -1001,7 +1001,7 @@ def build_pointlike_event(pmap, selector_output, event_number, timestamp): try: clusters = reco(xys, qs) except XYRecoFail: - c = NNN() + c = Cluster.empty() Z = tuple(NN for _ in range(0, evt.nS1)) DT = tuple(NN for _ in range(0, evt.nS1)) Zrms = NN From e07d8bc45aab23c2a8f877d2497db4f0d7344326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Mart=C3=ADnez=20Lema?= Date: Tue, 28 Jul 2026 09:45:36 +0000 Subject: [PATCH 2/2] Remove NNN --- invisible_cities/cities/components.py | 1 - invisible_cities/types/ic_types.py | 5 ----- invisible_cities/types/ic_types_test.py | 7 ------- 3 files changed, 13 deletions(-) diff --git a/invisible_cities/cities/components.py b/invisible_cities/cities/components.py index 5ec7e906d..15cbdbf67 100644 --- a/invisible_cities/cities/components.py +++ b/invisible_cities/cities/components.py @@ -79,7 +79,6 @@ from .. types .ic_types import NoneType from .. types .ic_types import xy from .. types .ic_types import NN -from .. types .ic_types import NNN from .. types .ic_types import minmax from .. types .ic_types import types_dict_summary from .. types .ic_types import types_dict_tracks diff --git a/invisible_cities/types/ic_types.py b/invisible_cities/types/ic_types.py index cad634b7e..96ba562c5 100644 --- a/invisible_cities/types/ic_types.py +++ b/invisible_cities/types/ic_types.py @@ -11,11 +11,6 @@ Tuple2Dor3D = Union[Tuple[float, float], Tuple[float, float, float]] -class NNN: - - def __getattr__(self, _): - return NN - class xy: def __init__(self, x, y): diff --git a/invisible_cities/types/ic_types_test.py b/invisible_cities/types/ic_types_test.py index fe5580b2f..b4b81d7fc 100644 --- a/invisible_cities/types/ic_types_test.py +++ b/invisible_cities/types/ic_types_test.py @@ -5,7 +5,6 @@ from . ic_types import minmax from . ic_types import xy from . ic_types import NN -from . ic_types import NNN from pytest import raises @@ -89,9 +88,3 @@ def test_xy(xy, a, b): np.isclose (xy.R , r, rtol=1e-4) np.isclose (xy.Phi, phi, rtol=1e-4) np.allclose(xy.pos, pos, rtol=1e-3, atol=1e-03) - - -@given(text(min_size=1, max_size=10, alphabet=ascii_letters)) -def test_NNN_generates_NN_for_every_attribute_name(name): - nnn = NNN() - assert getattr(nnn, name) == NN