From 718c9d0e63872b4797c5d3f1ebbfd9dc449ef089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Mon, 20 Feb 2023 20:12:36 +0100 Subject: [PATCH] make static methods factorize and test_sklrn_trans --- src/fimdlp/mdlp.py | 3 ++- src/fimdlp/tests/FImdlp_test.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fimdlp/mdlp.py b/src/fimdlp/mdlp.py index 0378ebf..2a2114a 100644 --- a/src/fimdlp/mdlp.py +++ b/src/fimdlp/mdlp.py @@ -151,7 +151,8 @@ class FImdlp(TransformerMixin, BaseEstimator): ) return result - def factorize(self, yy): + @staticmethod + def factorize(yy): """Factorize the input labels Parameters diff --git a/src/fimdlp/tests/FImdlp_test.py b/src/fimdlp/tests/FImdlp_test.py index fcfd888..068a4e8 100644 --- a/src/fimdlp/tests/FImdlp_test.py +++ b/src/fimdlp/tests/FImdlp_test.py @@ -205,7 +205,8 @@ class FImdlpTest(unittest.TestCase): computed = clf.factorize(y) self.assertListEqual([0, 1, 1, 2, 3], computed) - def test_sklearn_transformer(self): + @staticmethod + def test_sklearn_transformer(): for check, test in check_estimator(FImdlp(), generate_only=True): test(check)