From 709927a5744c2a8676ced0bafc5994414220f2c6 Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Sun, 18 May 2014 00:10:48 -0700 Subject: [PATCH] fix reg test --- SimPEG/Directives.py | 6 ++---- SimPEG/Tests/test_regularization.py | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/SimPEG/Directives.py b/SimPEG/Directives.py index 0334e0e4..2e2de55d 100644 --- a/SimPEG/Directives.py +++ b/SimPEG/Directives.py @@ -3,9 +3,7 @@ import Utils, numpy as np class InversionDirective(object): """InversionDirective""" - debug = False #: Print debugging information - - current = None #: This hold + debug = False #: Print debugging information def __init__(self, **kwargs): Utils.setKwargs(self, **kwargs) @@ -23,7 +21,7 @@ class InversionDirective(object): @property def invProb(self): return self.inversion.invProb @property - def opt(self): return self.inversion.opt + def opt(self): return self.invProb.opt @property def reg(self): return self.invProb.reg @property diff --git a/SimPEG/Tests/test_regularization.py b/SimPEG/Tests/test_regularization.py index 71265456..8f8c694a 100644 --- a/SimPEG/Tests/test_regularization.py +++ b/SimPEG/Tests/test_regularization.py @@ -21,8 +21,8 @@ class RegularizationTests(unittest.TestCase): print 'Check:', R mapping = r.mapPair(self.mesh2) reg = r(self.mesh2, mapping=mapping) - m = mapping.example() - reg.mref = mapping.example()*0 + m = np.random.rand(mapping.nP) + reg.mref = m[:]*0 passed = checkDerivative(lambda m : [reg.modelObj(m), reg.modelObjDeriv(m)], m, plotIt=False) self.assertTrue(passed)