aboutsummaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorBas Nijholt <basnijholt@gmail.com>2019-06-18 01:04:21 +0000
committerBas Nijholt <basnijholt@gmail.com>2019-06-18 01:04:21 +0000
commit550e8a1cb447a06bcb333f532a08e3f277adb0fd (patch)
tree39247b4f7abb70bc6f58ed64847d030f2e924d23 /README.rst
parent2c5446877794b7a900bb97f084f837253d78417a (diff)
fix the rst syntax and a typoHEADmaster
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst44
1 files changed, 24 insertions, 20 deletions
diff --git a/README.rst b/README.rst
index 838add1..1960a6c 100644
--- a/README.rst
+++ b/README.rst
@@ -14,35 +14,39 @@ Adaptive Quadrature Using Explicit Interpolants", Pedro Gonnet, ACM TOMS 37,
Usage example
-------------
-```
-import numpy
-import vquad
+.. code-block:: python
-# Simple usage.
-igral, err = vquad.vquad(numpy.cos, -1, 1, rtol=1e-10)
+ import numpy
+ import vquad
-# Object interface.
-it = vquad.Vquad(numpy.cos, -1, 1)
-igral, err = it.improve_until(rtol=1e-10)
+ # Simple usage.
+ igral, err = vquad.vquad(numpy.cos, -1, 1, rtol=1e-10)
-# Evaluate interpolant.
-xs = numpy.linspace(-1, 1, 101)
-ys = it(xs)
-```
+ # Object interface.
+ it = vquad.Vquad(numpy.cos, -1, 1)
+ igral, err = it.improve_until(rtol=1e-10)
-Benachmarks and tests
----------------------
+ # Evaluate interpolant.
+ xs = numpy.linspace(-1, 1, 101)
+ ys = it(xs)
+
+
+Benchmarks and tests
+--------------------
Vquad includes extensive tests and benchmarks. The tests focus on verifying
correctness and can be run with
-```
-python3 -m pytest -s
-```
+
+.. code-block:: bash
+
+ python3 -m pytest -s
+
The `-s` shows some statistics that are gathered during the testing.
The benchmarks take longer to run and allow to quantitatively compare the
performance of the algorithm. The benchmark is run by executing the vquad
module. To get help, run:
-```
-python3 -m vquad -h
-```
+
+.. code-block:: bash
+
+ python3 -m vquad -h