diff options
author | Matti Picus <matti.picus@gmail.com> | 2020-03-05 13:58:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 13:58:54 +0200 |
commit | 0c32bb4140215f99b935eae9001eabb10e3c47dc (patch) | |
tree | 443222a7824f1bd5d2ea57c0e33d536eac3a34a5 | |
parent | 459bfb4af46de23e01e215784520aa2b81393dfe (diff) | |
download | numpy-0c32bb4140215f99b935eae9001eabb10e3c47dc.tar.gz |
DOC: fix SVD tutorial to pass refguide (#15710)
* DOC: fix printing and add traceback for SVD tutorial
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
-rw-r--r-- | doc/source/user/tutorial-svd.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/source/user/tutorial-svd.rst b/doc/source/user/tutorial-svd.rst index ba65988a9..e1918f394 100644 --- a/doc/source/user/tutorial-svd.rst +++ b/doc/source/user/tutorial-svd.rst @@ -62,7 +62,7 @@ image. We'll use the ``face`` image from the `scipy.misc` module: Now, ``img`` is a NumPy array, as we can see when using the ``type`` function:: >>> type(img) - numpy.ndarray + <class 'numpy.ndarray'> We can see the image using the `matplotlib.pyplot.imshow` function:: @@ -266,6 +266,11 @@ have a second axis. Executing :: >>> s @ Vt + Traceback (most recent call last): + ... + ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, + with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1024 is different from + 768) results in a ``ValueError``. This happens because having a one-dimensional array for ``s``, in this case, is much more economic in practice than building a |