re-enabled a previous bugfix which was lost in a merge

This commit is contained in:
James Hensman 2013-04-23 17:11:04 +01:00
parent e6165e6b35
commit 43b9eacd8a

View file

@ -13,6 +13,7 @@ import priors
from ..util.linalg import jitchol from ..util.linalg import jitchol
from ..inference import optimization from ..inference import optimization
from .. import likelihoods from .. import likelihoods
import re
class model(parameterised): class model(parameterised):
def __init__(self): def __init__(self):
@ -239,7 +240,7 @@ class model(parameterised):
for s in positive_strings: for s in positive_strings:
for i in self.grep_param_names(s): for i in self.grep_param_names(s):
if not (i in currently_constrained): if not (i in currently_constrained):
to_make_positive.append(param_names[i]) to_make_positive.append(re.escape(param_names[i]))
if warn: if warn:
print "Warning! constraining %s postive"%name print "Warning! constraining %s postive"%name
if len(to_make_positive): if len(to_make_positive):