Bugfix: model.multivariate.variable was not considering the 'func' parameter

This commit is contained in:
Petrônio Cândido de Lima e Silva 2022-01-27 09:58:28 -03:00 committed by GitHub
parent 7823bdbbd4
commit d3aaa8a692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,11 +47,11 @@ class Variable:
:param kwargs: :param kwargs:
:return: :return:
""" """
fs = kwargs.get('partitioner', Grid.GridPartitioner) fs = kwargs.pop('partitioner', Grid.GridPartitioner)
mf = kwargs.get('func', Membership.trimf) mf = kwargs.pop('func', Membership.trimf)
np = kwargs.get('npart', 10) np = kwargs.pop('npart', 10)
data = kwargs.get('data', None) data = kwargs.get('data', None)
kw = kwargs.get('partitioner_specific', {}) kw = kwargs.pop('partitioner_specific', {})
self.partitioner = fs(data=data[self.data_label].values, npart=np, func=mf, self.partitioner = fs(data=data[self.data_label].values, npart=np, func=mf,
transformation=self.transformation, prefix=self.alias, transformation=self.transformation, prefix=self.alias,
variable=self.name, **kw) variable=self.name, **kw)