Nparam_transformed work better now

Before, counted the number of fixes, which failed when a fix fixed more
than one parameter...
This commit is contained in:
James Hensman 2013-04-22 13:37:59 +01:00
parent 698f52e5e3
commit 8bd017466d

View file

@ -103,10 +103,18 @@ class parameterised(object):
return expr
def Nparam_transformed(self):
ties = 0
for ar in self.tied_indices:
ties += ar.size - 1
return self.Nparam - len(self.constrained_fixed_indices) - ties
"""
Compute the number of parameters after ties and fixing have been performed
"""
ties = 0
for ti in self.tied_indices:
ties += ti.size - 1
fixes = 0
for fi in self.constrained_fixed_indices:
fixes += len(fi)
return self.Nparam - fixes - ties
def constrain_positive(self, which):
"""