Skip to content

Commit

Permalink
doc fixes and spelling check as per @andrewgsavage review
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed May 15, 2024
1 parent 71983bf commit 02f3be1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion doc/formatting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ formatting options. They can be added at the end of the format string:

- ``L`` for a **LaTeX** output:

>>> print x*1e7
>>> print(x*1e7)
(2.00+/-0.10)e+06
>>> print('{:L}'.format(x*1e7)) # Automatic exponent form, LaTeX
\left(2.00 \pm 0.10\right) \times 10^{6}
Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Uncertainties

The `uncertainties package`_ is an open source Python library for doing
calculations on numbers that have uncertainties (like 3.14±0.01) that are
common in many scientific fields. The calcualtions done with this package will
common in many scientific fields. The calculations done with this package will
propagate the uncertainties to the result of mathematical calculations.
The :mod:`uncertainties` package takes the pain and
complexity out of uncertainty calculations and error propagation. Here is a
Expand All @@ -33,7 +33,7 @@ values. For other approaches, see soerp_ (using higher-order terms) and mcerp_
(using a Monte-Carlo approach).

The `source code`_ for the uncertainties package is licensed under the `Revised
BSD License`_. This dcoumentation is licensed under the `CC-SA-3 License`_.
BSD License`_. This documentation is licensed under the `CC-SA-3 License`_.

.. _uncertainties package: https://pypi.python.org/pypi/uncertainties/
.. _error propagation theory: https://en.wikipedia.org/wiki/Propagation_of_uncertainty
Expand Down
12 changes: 6 additions & 6 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You can upgrade from an older version of :mod:`uncertainties` with:
Other packaging systems such as `Anaconda <https://www.anaconda.com>`_,
`MacPorts <http://www.macports.org/>`_, or Linux package managrer may also
`MacPorts <http://www.macports.org/>`_, or Linux package manager may also
maintain packages for :mod:`uncertainties`, so that you may also be able to
install using something like

Expand All @@ -50,17 +50,17 @@ depending on your platform and installation of Python. For all installations
of Python, using `pip` should work and is therefore recommended.


Souce code and Development Version
==================================
Source code and Development Version
=====================================

.. _download: https://pypi.python.org/pypi/uncertainties/#files
.. _GitHub releases: https://github.com/lmfit/uncertainties/releases
.. _NumPy: http://numpy.scipy.org/

You can `download`_ the latest source package archive from the Python Package
Index (PyPI) and unpack it, or from the `GitHub releases`_ page. This package
can be unpacked using `unzip`, `tar xf` , or other similar utilites, and then
installeed with
can be unpacked using `unzip`, `tar xf` , or other similar utilities, and then
installed with

.. code-block:: sh
Expand Down Expand Up @@ -103,7 +103,7 @@ Credits
The :mod:`uncertainties` package was written and developed by `Eric O. LEBIGOT
(EOL)`_. EOL also maintained the package until 2024, when the GitHub project
was moved to the `lmfit GitHub organization`_ to allow more sustainable
development and maintenance. Currentt members of the devlopment and
development and maintenance. Current members of the devlopment and
maintenance team include `Andrew G Savage <https://github.com/andrewgsavage>`_,
`Justin Gerber <https://github.com/jagerber48>`_,
`Eric O Legibot <https://github.com/lebigot>`_,
Expand Down
6 changes: 3 additions & 3 deletions doc/numpy_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Arrays of numbers with uncertainties can be built from values and
uncertainties:

>>> arr = unumpy.uarray([1, 2], [0.01, 0.002])
>>> print arr
>>> print(arr)
[1.0+/-0.01 2.0+/-0.002]

NumPy arrays of numbers with uncertainties can also be built directly
Expand Down Expand Up @@ -100,7 +100,7 @@ work). This is why the :class:`unumpy.matrix` class is provided: both
the inverse and the pseudo-inverse of a matrix can be calculated in
the usual way: if :data:`mat` is a :class:`unumpy.matrix`,

>>> print mat.I
>>> print(mat.I)

does calculate the inverse or pseudo-inverse of :data:`mat` with
uncertainties.
Expand Down Expand Up @@ -132,7 +132,7 @@ This module defines uncertainty-aware mathematical functions that
generalize those from :mod:`uncertainties.umath` so that they work on
NumPy arrays of numbers with uncertainties instead of just scalars:

>>> print unumpy.cos(arr) # Cosine of each array element
>>> print(unumpy.cos(arr)) # Cosine of each array element

NumPy's function names are used, and not those from the :mod:`math`
module (for instance, :func:`unumpy.arccos` is defined, like in NumPy,
Expand Down
6 changes: 3 additions & 3 deletions doc/tech_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ If the variable :data:`a` above is modified, the value of :data:`poly`
is not modified, as is usual in Python:

>>> a = 123
>>> print poly
>>> print(poly)
46.0+/-0.4 # Still equal to x**2 + 42, not x**2 + 123

Random variables can, on the other hand, have their uncertainty
updated on the fly, because quantities with uncertainties (like
:data:`poly`) keep track of them:

>>> x.std_dev = 0
>>> print poly
>>> print(poly)
46+/-0 # Zero uncertainty, now

As usual, Python keeps track of objects as long as they are used.
Expand All @@ -374,7 +374,7 @@ Thus, redefining the value of :data:`x` does not change the fact that
in :data:`x`:

>>> x = 10000
>>> print poly
>>> print(poly)
46+/-0 # Unchanged

These mechanisms make quantities with uncertainties behave mostly like
Expand Down
6 changes: 3 additions & 3 deletions doc/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Creating Variables: numbers with uncertainties
================================================

To create a number with uncertainties or *Variable*, use the :func:`ufloat`
function, which takes a *nominal value* ( (which can be interpreted as the most
function, which takes a *nominal value* (which can be interpreted as the most
likely value, or the mean or central value of the distribution of values), a
*standard error* ( (the standard deviation or :math:`1-\sigma` uncertainty), and
*standard error* (the standard deviation or :math:`1-\sigma` uncertainty), and
an optional *tag*:

>>> x = ufloat(2.7, 0.01) # x = 2.7+/-0.01
Expand Down Expand Up @@ -220,7 +220,7 @@ The concept of comparing the magnitude of values with uncertainties is a bit
complicated. That is, a Variable with a value of 25 +/- 10 might be greater
than a Variable with a value of 24 +/- 8 most of the time, but *sometimes* it
might be less than it. The :mod:`uncertainties` package takes the simple
approach of comparing. That is
approach of comparing nominal values. That is

>>> a = ufloat(25, 10)
>>> b = ufloat(24, 8)
Expand Down

0 comments on commit 02f3be1

Please sign in to comment.