Merge branch 'master' into release1.7

This commit is contained in:
Petrônio Cândido de Lima e Silva 2023-03-20 11:14:14 -03:00 committed by GitHub
commit 6c79e98efe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,12 @@ class GridPartitioner(partitioner.Partitioner):
kwargs = {'type': self.type, 'variable': self.variable}
dlen = self.max - self.min
partlen = dlen / self.partitions
#dlen = self.max - self.min
#partlen = dlen / self.partitions
count = 0
for c in np.linspace(self.min, self.max, self.partitions, endpoint=False):
centers, partlen = np.linspace(self.min, self.max, self.partitions, retstep=True)
for c in centers:
_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)