Skip to content
Snippets Groups Projects
Commit 54c5f6b8 authored by Christoph Groth's avatar Christoph Groth
Browse files

respect proper numpydoc section name

Because of the incorrect name, the example in the docstring of lamdify
was not even visible in the documentation.
parent 770bbdf5
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ def lambdify(expr, locals=None):
locals : dict or ``None`` (default)
Additional definitions for `~kwant.continuum.sympify`.
Example:
Examples
--------
>>> f = lambdify('a + b', locals={'b': 'b + c'})
>>> f(1, 3, 5)
......@@ -226,8 +226,8 @@ def monomials(expr, gens=None):
-------
dictionary (generator: monomial)
Example
-------
Examples
--------
>>> expr = kwant.continuum.sympify("A * (x**2 + y) + B * x + C")
>>> monomials(expr, gens=('x', 'y'))
{1: C, x: B, x**2: A, y: A}
......
......@@ -32,11 +32,6 @@ if uses_umfpack:
Return a fuction for solving a sparse linear system, with A
pre-factorized.
Example:
solve = factorized(A) # Makes LU decomposition.
x1 = solve(rhs1) # Uses the LU factors.
x2 = solve(rhs2) # Uses again the LU factors.
Parameters
----------
A : csc_matrix
......@@ -49,6 +44,12 @@ if uses_umfpack:
0.001 respectively. Whether piv_tol or sym_piv_tol are used is
decided internally by UMFPACK, depending on whether the matrix is
"symmetric" enough.
Examples
--------
solve = factorized(A) # Makes LU decomposition.
x1 = solve(rhs1) # Uses the LU factors.
x2 = solve(rhs2) # Uses again the LU factors.
"""
if not sp.isspmatrix_csc(A):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment