From df629077e26ee8f6aab2655cf76a8bffc507e60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido=20de=20Lima=20e=20Silva?= Date: Mon, 20 Mar 2023 11:11:12 -0300 Subject: [PATCH] Improvement suggested by FABRICIO JAVIER ERAZO COSTA, replace np.arange for np.linspace --- pyFTS/partitioners/Grid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyFTS/partitioners/Grid.py b/pyFTS/partitioners/Grid.py index 2b1b14f..ea5c1d9 100644 --- a/pyFTS/partitioners/Grid.py +++ b/pyFTS/partitioners/Grid.py @@ -26,7 +26,7 @@ class GridPartitioner(partitioner.Partitioner): partlen = dlen / self.partitions count = 0 - for c in np.arange(self.min, self.max, partlen): + for c in np.linspace(self.min, self.max, self.partitions, endpoint=False): _name = self.get_name(count) if self.membership_function == Membership.trimf: sets[_name] = FuzzySet.FuzzySet(_name, Membership.trimf, [c - partlen, c, c + partlen],c,**kwargs)