From ab0e9ad1b7c5fa32304da8ffd305db69647de781 Mon Sep 17 00:00:00 2001 From: Lev Levitsky Date: Tue, 9 Jul 2024 14:58:47 +0200 Subject: [PATCH] Fix test for Python 2 --- tests/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data.py b/tests/data.py index 67bdd94..44b8690 100644 --- a/tests/data.py +++ b/tests/data.py @@ -12,7 +12,7 @@ # updated to avoid calling np.allclose: since numpy 2.0 this results in a RecursionError class ComparableArray(np.ndarray): def __new__(cls, *args, **kwargs): - inst = super().__new__(cls, *args, **kwargs) + inst = super(ComparableArray, cls).__new__(cls, *args, **kwargs) inst._atol = kwargs.pop('atol', 1e-8) inst._rtol = kwargs.pop('rtol', 1e-5) return inst