Updates to docs errors.

This commit is contained in:
Rowan Cockett
2016-05-29 18:57:38 -07:00
parent a131383dae
commit bc073e49b5
7 changed files with 56 additions and 24 deletions
+1
View File
@@ -0,0 +1 @@
from environmentSetup import supress_nonlocal_image_warn
+15
View File
@@ -0,0 +1,15 @@
def supress_nonlocal_image_warn():
import sphinx.environment
sphinx.environment.BuildEnvironment.warn_node = _supress_nonlocal_image_warn
def _supress_nonlocal_image_warn(self, msg, node):
from docutils.utils import get_source_line
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node))
if __name__ == '__main__':
checkDependencies()
+4 -2
View File
@@ -27,7 +27,8 @@ back to conductivity. This is a relatively trivial example (we are just taking
the exponential!) but by defining maps we can start to combine and manipulate
exactly what we think about as our model, \\\(m\\\). In code, this looks like
::
.. code-block:: python
:linenos:
M = Mesh.TensorMesh([100]) # Create a mesh
expMap = Maps.ExpMap(M) # Create a mapping
@@ -50,7 +51,8 @@ To do this we will introduce the vertical 1D map (:class:`SimPEG.Maps.SurjectVer
which does the first part of what we just described. The second part will be
done by the :class:`SimPEG.Maps.ExpMap` described above.
::
.. code-block:: python
:linenos:
M = Mesh.TensorMesh([7,5])
v1dMap = Maps.SurjectVertical1D(M)
+9 -3
View File
@@ -21,7 +21,7 @@ Solver Utilities
:undoc-members:
Curv Utilities
=============
==============
.. automodule:: SimPEG.Utils.curvutils
:members:
@@ -51,7 +51,10 @@ Interpolation Utilities
Counter Utilities
=================
::
.. code-block:: python
:linenos:
class MyClass(object):
def __init__(self, url):
self.counter = Counter()
@@ -69,7 +72,10 @@ Counter Utilities
for i in range(300): c.MySecondMethod()
c.counter.summary()
::
.. code-block:: text
:linenos:
Counters:
MyClass.MyMethod : 100
+3
View File
@@ -251,3 +251,6 @@ texinfo_documents = [
#texinfo_show_urls = 'footnote'
autodoc_member_order = 'bysource'
from _ext import supress_nonlocal_image_warn
supress_nonlocal_image_warn()