From 831eca50221accde729c3cb22c6d957f0b38804b Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Wed, 30 Oct 2013 23:28:14 -0600 Subject: [PATCH] Some documentation. --- SimPEG/tests/TestUtils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SimPEG/tests/TestUtils.py b/SimPEG/tests/TestUtils.py index 83738a75..ff7ee668 100644 --- a/SimPEG/tests/TestUtils.py +++ b/SimPEG/tests/TestUtils.py @@ -192,6 +192,16 @@ def checkDerivative(fctn, x0, num=7, plotIt=True, dx=None): :rtype: bool :return: did you pass the test?! + + .. plot:: + :include-source: + + from SimPEG.tests import checkDerivative + from SimPEG.utils import sdiag + import numpy as np + def simplePass(x): + return np.sin(x), sdiag(np.cos(x)) + checkDerivative(simplePass, np.random.randn(5)) """ print "%s checkDerivative %s" % ('='*20, '='*20)