summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-04-02 22:12:07 +0100
committerGitHub <noreply@github.com>2017-04-02 22:12:07 +0100
commit77eab400b16b7f77ed12debf7ad62449ba7461cd (patch)
tree37341a680cacacd46a6bea0ec529f6e9db2564a5 /numpy
parent02e4a57d73d093db347e5afbeaf23153a86f4136 (diff)
parent5b0e3aa11ac5ae7b16ae6c2d72bb5624d3c124bc (diff)
downloadnumpy-77eab400b16b7f77ed12debf7ad62449ba7461cd.tar.gz
Merge pull request #8836 from MSeifert04/doc_fixed_some_sphinx_warnings
DOC: Several documentation fixes (broken links, incorrect sphinx syntax, duplicate sections)
Diffstat (limited to 'numpy')
-rw-r--r--numpy/linalg/linalg.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py
index e5623ad97..8ebee0f6f 100644
--- a/numpy/linalg/linalg.py
+++ b/numpy/linalg/linalg.py
@@ -975,9 +975,9 @@ def eigvalsh(a, UPLO='L'):
>>> a = np.array([[1, -2j], [2j, 5]])
>>> LA.eigvalsh(a)
array([ 0.17157288, 5.82842712])
-
+
>>> # demonstrate the treatment of the imaginary part of the diagonal
- >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
+ >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
>>> a
array([[ 5.+2.j, 9.-2.j],
[ 0.+2.j, 2.-1.j]])
@@ -1261,7 +1261,7 @@ def eigh(a, UPLO='L'):
[ 0.00000000+0.38268343j, 0.00000000-0.92387953j]])
>>> # demonstrate the treatment of the imaginary part of the diagonal
- >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
+ >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
>>> a
array([[ 5.+2.j, 9.-2.j],
[ 0.+2.j, 2.-1.j]])
@@ -2357,14 +2357,13 @@ def multi_dot(arrays):
>>> # or
>>> A.dot(B).dot(C).dot(D)
-
- Example: multiplication costs of different parenthesizations
- ------------------------------------------------------------
-
+ Notes
+ -----
The cost for a matrix multiplication can be calculated with the
following function::
- def cost(A, B): return A.shape[0] * A.shape[1] * B.shape[1]
+ def cost(A, B):
+ return A.shape[0] * A.shape[1] * B.shape[1]
Let's assume we have three matrices
:math:`A_{10x100}, B_{100x5}, C_{5x50}$`.