mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-05 02:00:08 +08:00
Key word args for the model.test() function that go to checkDeriv
This commit is contained in:
+4
-2
@@ -58,11 +58,13 @@ class BaseModel(object):
|
||||
def example(self):
|
||||
return np.random.rand(self.nP)
|
||||
|
||||
def test(self, m=None):
|
||||
def test(self, m=None, **kwargs):
|
||||
print 'Testing the %s Class!' % self.__class__.__name__
|
||||
if m is None:
|
||||
m = self.example()
|
||||
return checkDerivative(lambda m : [self.transform(m), self.transformDeriv(m)], m, plotIt=False)
|
||||
if 'plotIt' not in kwargs:
|
||||
kwargs['plotIt'] = False
|
||||
return checkDerivative(lambda m : [self.transform(m), self.transformDeriv(m)], m, **kwargs)
|
||||
|
||||
class BaseNonLinearModel(object):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user