Skip to content

Commit 8a3a701

Browse files
committed
Merge pull request #206 from vahtras/errorfix
Fix html build errors
2 parents 52e8832 + 848d47d commit 8a3a701

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

advanced/advanced_numpy/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ Main point
481481
**The answer** (in Numpy)
482482

483483
- **strides**: the number of bytes to jump to find the next element
484-
- 1 stride per dimension::
484+
- 1 stride per dimension
485+
486+
.. code-block:: python
485487
486488
>>> x.strides
487489
(3, 1)

advanced/mathematical_optimization/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,13 +881,14 @@ Curve fitting
881881
:target: auto_examples/plot_curve_fit.html
882882
:align: right
883883

884+
.. Comment to make doctest pass
885+
>>> np.random.seed(0)
886+
884887
Least square problems occur often when fitting a non-linear to data.
885888
While it is possible to construct our optimization problem ourselves,
886889
scipy provides a helper function for this purpose:
887890
:func:`scipy.optimize.curve_fit`::
888891

889-
.. Comment to make doctest pass
890-
>>> np.random.seed(0)
891892

892893
>>> def f(t, omega, phi):
893894
... return np.cos(omega * t + phi)

guide/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This is the way to include your image and link it to the code:
9090
You can display the corresponding code using the ``literal-include``
9191
directive.
9292

93-
.. literal-include:: examples/plot_simple.py
93+
.. literalinclude:: examples/plot_simple.py
9494

9595
.. note::
9696

intro/language/functions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ Exercises
376376
.. topic:: Exercise: Quicksort
377377
:class: green
378378

379-
Implement the quicksort algorithm, as defined by wikipedia::
379+
Implement the quicksort algorithm, as defined by wikipedia
380+
381+
.. parsed-literal::
380382
381383
function quicksort(array)
382384
var list less, greater

intro/scipy.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,12 @@ our initial guess: ::
446446

447447
**Curve fitting**
448448

449-
Suppose we have data sampled from ``f`` with some noise: ::
450-
451449
.. Comment to make doctest pass
452450
>>> np.random.seed(42)
453451
452+
Suppose we have data sampled from ``f`` with some noise: ::
453+
454+
454455
>>> xdata = np.linspace(-10, 10, num=20)
455456
>>> ydata = f(xdata) + np.random.randn(xdata.size)
456457

0 commit comments

Comments
 (0)