[Python-modules-commits] [mpmath] 02/13: Import mpmath_1.0.0.orig.tar.gz

Sandro Tosi morph at moszumanska.debian.org
Sun Nov 26 05:20:29 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository mpmath.

commit c49af292c12701e432e27a544c61231e3f5317f6
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Nov 25 21:47:52 2017 -0500

    Import mpmath_1.0.0.orig.tar.gz
---
 .gitattributes                         |   2 +
 .gitignore                             |  47 ++
 .travis.yml                            |  17 +
 CHANGES                                |  39 ++
 LICENSE                                |   2 +-
 MANIFEST.in                            |   4 +
 PKG-INFO                               |  11 -
 README.rst                             |  20 +-
 TODO                                   |   1 +
 demo/plotting.py                       |   2 +-
 doc/run_doctest.py                     |  15 -
 doc/source/basics.txt                  |  26 +-
 doc/source/calculus/index.txt          |   1 +
 doc/source/calculus/inverselaplace.txt |  64 +++
 doc/source/conf.py                     |  19 +-
 doc/source/conf.py~                    | 137 ------
 doc/source/contexts.txt                |  30 +-
 doc/source/functions/gamma.txt         |   9 +-
 doc/source/general.txt~                | 228 ---------
 doc/source/matrices.txt                |  36 +-
 doc/source/matrices.txt~               | 539 ---------------------
 doc/source/plots/ai.py                 |   2 +-
 doc/source/plots/ai_c.py               |   2 +-
 doc/source/plots/ber.py                |   2 +-
 doc/source/plots/besseli.py            |   2 +-
 doc/source/plots/besseli_c.py          |   2 +-
 doc/source/plots/besselj.py            |   2 +-
 doc/source/plots/besselj_c.py          |   2 +-
 doc/source/plots/besselk.py            |   2 +-
 doc/source/plots/besselk_c.py          |   2 +-
 doc/source/plots/bessely.py            |   2 +-
 doc/source/plots/bessely_c.py          |   2 +-
 doc/source/plots/bi.py                 |   2 +-
 doc/source/plots/bi_c.py               |   2 +-
 doc/source/plots/chebyt.py             |   2 +-
 doc/source/plots/chebyu.py             |   2 +-
 doc/source/plots/coulombf.py           |   2 +-
 doc/source/plots/coulombf_c.py         |   2 +-
 doc/source/plots/coulombg.py           |   2 +-
 doc/source/plots/coulombg_c.py         |   2 +-
 doc/source/plots/ellipk.py             |   2 +-
 doc/source/plots/gi.py                 |   2 +-
 doc/source/plots/gi_c.py               |   2 +-
 doc/source/plots/hankel1.py            |   2 +-
 doc/source/plots/hankel1_c.py          |   2 +-
 doc/source/plots/hankel2.py            |   2 +-
 doc/source/plots/hankel2_c.py          |   2 +-
 doc/source/plots/hermite.py            |   2 +-
 doc/source/plots/hi.py                 |   2 +-
 doc/source/plots/hi_c.py               |   2 +-
 doc/source/plots/ker.py                |   2 +-
 doc/source/plots/kleinj.py             |   2 +-
 doc/source/plots/kleinj2.py            |   2 +-
 doc/source/plots/laguerre.py           |   2 +-
 doc/source/plots/lambertw.py           |   2 +-
 doc/source/plots/lambertw_c.py         |   2 +-
 doc/source/plots/legendre.py           |   2 +-
 doc/source/plots/lommels1.py           |   2 +-
 doc/source/plots/lommels2.py           |   2 +-
 doc/source/plots/spherharm40.py        |   2 +-
 doc/source/plots/spherharm41.py        |   2 +-
 doc/source/plots/spherharm42.py        |   2 +-
 doc/source/plots/spherharm43.py        |   2 +-
 doc/source/plots/spherharm43.py~       |  11 -
 doc/source/setup.txt                   |  29 +-
 doc/tag_docs.py                        |  35 --
 epydoc.conf                            | 148 ++++++
 mpmath/__init__.py                     |   9 +-
 mpmath/calculus/differentiation.py     |   2 +-
 mpmath/calculus/extrapolation.py       |   8 +-
 mpmath/calculus/inverselaplace.py      | 828 +++++++++++++++++++++++++++++++++
 mpmath/calculus/optimization.py        |  12 +-
 mpmath/calculus/polynomials.py         |  12 +-
 mpmath/calculus/quadrature.py          |   8 +-
 mpmath/ctx_base.py                     |   3 +
 mpmath/ctx_mp.py                       |  20 +
 mpmath/ctx_mp_python.py                |   4 +-
 mpmath/function_docs.py                |  63 ++-
 mpmath/functions/bessel.py             |   4 +-
 mpmath/functions/elliptic.py           |  19 +-
 mpmath/functions/expintegrals.py       |   5 +
 mpmath/functions/functions.py          |  13 +-
 mpmath/functions/hypergeometric.py     |  33 +-
 mpmath/functions/qfunctions.py         |   4 +-
 mpmath/functions/rszeta.py             |  31 +-
 mpmath/functions/zeta.py               |  13 +-
 mpmath/functions/zetazeros.py          |  20 +-
 mpmath/libmp/backend.py                |   5 +-
 mpmath/libmp/gammazeta.py              |   6 +-
 mpmath/libmp/libelefun.py              |  18 +-
 mpmath/libmp/libhyper.py               |   2 +
 mpmath/libmp/libmpc.py                 |   4 +-
 mpmath/libmp/libmpf.py                 |  17 +-
 mpmath/math2.py                        |   2 +-
 mpmath/matrices/calculus.py            |   2 +-
 mpmath/matrices/eigen.py               |  30 +-
 mpmath/matrices/eigen_symmetric.py     |  23 +-
 mpmath/matrices/linalg.py              |  38 +-
 mpmath/matrices/matrices.py            |  23 +-
 mpmath/tests/runtests.py               |   1 -
 mpmath/tests/test_basic_ops.py         |  42 +-
 mpmath/tests/test_bitwise.py           |  16 +
 mpmath/tests/test_calculus.py          |  93 ++++
 mpmath/tests/test_convert.py           |   1 -
 mpmath/tests/test_eigen.py             |  62 +--
 mpmath/tests/test_eigen_symmetric.py   |  54 +--
 mpmath/tests/test_elliptic.py          |  17 +
 mpmath/tests/test_functions.py         |   2 +
 mpmath/tests/test_functions2.py        |  37 +-
 mpmath/tests/test_gammazeta.py         |   4 +
 mpmath/tests/test_hp.py                |   1 -
 mpmath/tests/test_levin.py             |  26 +-
 mpmath/tests/test_linalg.py            |   4 +-
 mpmath/tests/test_matrices.py          |  41 +-
 mpmath/tests/test_rootfinding.py       |   2 -
 mpmath/tests/test_str.py               |   1 -
 mpmath/tests/torture.py                |   1 -
 mpmath/visualization.py                |  41 +-
 setup.cfg                              |  16 +
 setup.py                               |  12 +-
 120 files changed, 1893 insertions(+), 1418 deletions(-)

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9e8cc9d
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+*       text=auto
+*.py    diff=python text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..40e100b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,47 @@
+# This file tells git what files to ignore (e.g., you won't see them as
+# untracked with "git status").  Add anything to it that can be cleared
+# without any worry (e.g., by "git clean -Xdf"), because it can be
+# regenerated.  Lines beginning with # are comments.  You can also ignore
+# files on a per-repository basis by modifying the core.excludesfile
+# configuration option (see "git help config").  If you need to make git
+# track a file that is ignored for some reason, you have to use
+# "git add -f". See "git help gitignore" for more information.
+
+
+# Regular Python bytecode file
+*.pyc
+
+# Optimized Python bytecode file
+*.pyo
+
+# Vim's swap files
+*.sw[op]
+
+# Generated files from Jython
+*$py.class
+
+# File generated by setup.py using MANIFEST.in
+MANIFEST
+
+# Generated by ctags (used to improve autocompletion in vim)
+tags
+
+my/
+
+# Files generated by setup.py
+dist/
+build/
+
+# Tox files
+.tox/
+
+# Mac OS X Junk
+.DS_Store
+
+# Backup files
+*~
+
+.cache/
+.coverage
+doc/source/_build/
+
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..e01945f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: python
+sudo: false
+python:
+  - 2.6
+  - 2.7
+  - 3.2
+  - 3.3
+  - 3.4
+  - 3.5
+  - "pypy"
+install:
+  - pip install pep8
+script:
+  - pep8
+  - py.test
+notifications:
+  email: false
diff --git a/CHANGES b/CHANGES
index 70643f3..e39a4c6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,42 @@
+--1.0.0--
+Released September 27, 2017
+
+* Bumped to major version number for 10 year anniversary
+* Added module for inverse Laplace transforms, including the top level
+  function invertlaplace() as well as several different algorithms
+  (Talbot, Gaver-Stehfest and de Hoog) implemented in
+  mpmath.calculus.inverselaplace (Kris Kuhlman)
+* Fixed bugs in elliprg() giving incorrect values for certain input
+* Fixed wrong degree 1 nodes for Gaussian quadrature
+* Made make acot(0) and acoth(0) return a finite result
+* Fixed sieved zeta sum not being used in Python 3, and added cutoff
+  for sieved zeta sum on 32-bit systems when too much memory would be used
+* Fixed zeta(0,0.5) to return correct value instead of raising
+  NoConvergence exception
+* Added detection of exact zeros in gammainc(), in particular fixing
+  NoConvergence error for gammainc(3,-1+1j)
+* Fixed wrong values from besseli() due to improper internal precision
+* Fixed bessely(0,1j) to return complex nan instead of raising NameError
+  (Paul Masson)
+* Changed float() and complex() applied to an mpf or mpc to use rounding
+  to nearest (or the context rounding mode) instead truncating
+* Fix imaginary part of gammainc(n,x), n negative odd int, x < 0
+* Added alternative "phase" color scheme to cplot()
+* Better error message for int(inf) or int(nan) (Aaron Meurer)
+* Fixed polyroots() with error=True
+* Added support to pass optional initial values to polyroots()
+  (Michael Kagalenko)
+* Rewrote the Python major version selection to make it work if something
+  else has redefined xrange (Arne Brys)
+* Switched documentation formula rendering to MathJax (Sergey B Kirpichev)
+* Fixed documentation TeX build (Sergey B Kirpichev)
+* Added PEP8 conformity testing (Sergey B Kirpichev)
+* Various fixes for the test code and test infrastructure on different
+  platforms and Python versions (Sergey B Kirpichev)
+* Fixed module paths in setup.py (Aaron Meurer)
+* Documented more options for methods such as nstr() and hyper()
+* Miscellaneous corrections to the documentation (various)
+
 --0.19--
 Released June 10, 2014
 
diff --git a/LICENSE b/LICENSE
index d709712..3bc8ac1 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2013 Fredrik Johansson and mpmath contributors
+Copyright (c) 2005-2017 Fredrik Johansson and mpmath contributors
 
 All rights reserved.
 
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..94594ce
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,4 @@
+include mpmath/*.py
+include mpmath/tests/*.py
+include LICENSE
+include CHANGES
diff --git a/PKG-INFO b/PKG-INFO
deleted file mode 100644
index 7d8c06d..0000000
--- a/PKG-INFO
+++ /dev/null
@@ -1,11 +0,0 @@
-Metadata-Version: 1.1
-Name: mpmath
-Version: 0.19
-Summary: Python library for arbitrary-precision floating-point arithmetic
-Home-page: http://mpmath.org
-Author: Fredrik Johansson
-Author-email: fredrik.johansson at gmail.com
-License: BSD
-Description: UNKNOWN
-Platform: UNKNOWN
-Classifier: Topic :: Scientific/Engineering :: Mathematics
diff --git a/README.rst b/README.rst
index f0e6bca..4b0da5d 100644
--- a/README.rst
+++ b/README.rst
@@ -12,7 +12,7 @@ LICENSE file for details)
 0. History and credits
 ----------------------
 
-The following people have contributed patches and new features
+The following people (among others) have contributed patches and new features
 to mpmath:
 
 * Pearu Peterson <pearu.peterson at gmail.com>
@@ -31,6 +31,8 @@ to mpmath:
 * Ken Allen <ken.allen at sbcglobal.net>
 * Timo Hartmann <thartmann15 at gmail.com>
 * Sergey B Kirpichev <skirpichev at gmail.com>
+* Kris Kuhlman <kristopher.kuhlman at gmail.com>
+* Paul Masson <paulmasson at analyticphysics.com>
 
 Numerous other people have contributed by reporting bugs,
 requesting new features, or suggesting improvements to the
@@ -71,6 +73,7 @@ Credit also goes to:
 
 Release history:
 
+* Version 1.0.0 released on September 27, 2017
 * Version 0.19 released on June 10, 2014
 * Version 0.18 released on December 31, 2013
 * Version 0.17 released on February 1, 2011
@@ -95,13 +98,20 @@ Release history:
 --------------------------
 
 Mpmath requires Python 2.5 or later. It has been tested
-with Python 2.5, 2.6, 2.7, 3.1 and 3.2.
+with Python 2.6, 2.7, and 3.2 through 3.5. It should also
+run under other Python implementations such as PyPy.
 
 The latest release of mpmath can be downloaded from the mpmath
-website. It should also be available in the Python Package Index at
-http://pypi.python.org/pypi
+website and from https://github.com/fredrik-johansson/mpmath/releases
 
-To install, unpack the mpmath archive and run
+It should also be available in the Python Package Index at
+https://pypi.python.org/pypi/mpmath
+
+To install latest release of Mpmath with pip, simply run
+
+``pip install mpmath``
+
+Or unpack the mpmath archive and run
 
 ``python setup.py install``
 
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..802d2a0
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+See README and the mpmath website for more information.
diff --git a/demo/plotting.py b/demo/plotting.py
index 88e7996..6d41a32 100644
--- a/demo/plotting.py
+++ b/demo/plotting.py
@@ -33,4 +33,4 @@ def main():
     print "Plotting..."
     plot(functions, xlim=xlim)
 
-main()
\ No newline at end of file
+main()
diff --git a/doc/run_doctest.py b/doc/run_doctest.py
deleted file mode 100644
index ff67fc8..0000000
--- a/doc/run_doctest.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import os.path
-import sys
-
-sys.path.insert(0, '..')
-
-path = "source"
-
-import doctest
-for f in os.listdir(path):
-    if f.endswith(".txt"):
-        print f
-        doctest.testfile(os.path.join(path, f), module_relative=False)
diff --git a/doc/source/basics.txt b/doc/source/basics.txt
index 18cab99..c6f9e19 100644
--- a/doc/source/basics.txt
+++ b/doc/source/basics.txt
@@ -72,7 +72,7 @@ Setting the precision
 
 Mpmath uses a global working precision; it does not keep track of the precision or accuracy of individual numbers. Performing an arithmetic operation or calling ``mpf()`` rounds the result to the current working precision. The working precision is controlled by a context object called ``mp``, which has the following default state:
 
-    >>> print mp
+    >>> print(mp)
     Mpmath settings:
       mp.prec = 53                [default: 53]
       mp.dps = 15                 [default: 15]
@@ -106,12 +106,12 @@ The precision of complex arithmetic is also controlled by the ``mp`` object:
 There is no restriction on the magnitude of numbers. An ``mpf`` can for example hold an approximation of a large Mersenne prime:
 
     >>> mp.dps = 15
-    >>> print mpf(2)**32582657 - 1
+    >>> print(mpf(2)**32582657 - 1)
     1.24575026015369e+9808357
 
 Or why not 1 googolplex:
 
-    >>> print mpf(10) ** (10**100)  # doctest:+ELLIPSIS
+    >>> print(mpf(10) ** (10**100))  # doctest:+ELLIPSIS
     1.0e+100000000000000000000000000000000000000000000000000...
 
 The (binary) exponent is stored exactly and is independent of the precision.
@@ -125,13 +125,13 @@ It is often useful to change the precision during only part of a calculation. A
     >>> # do_something()
     >>> mp.prec -= 2
 
-In Python 2.5, the ``with`` statement along with the mpmath functions ``workprec``, ``workdps``, ``extraprec`` and ``extradps`` can be used to temporarily change precision in a more safe manner:
+Since Python 2.5, the ``with`` statement along with the mpmath functions ``workprec``, ``workdps``, ``extraprec`` and ``extradps`` can be used to temporarily change precision in a more safe manner:
 
-    >>> from __future__ import with_statement
+    >>> from __future__ import with_statement  # only need this in Python 2.5
     >>> with workdps(20):  # doctest: +SKIP
-    ...     print mpf(1)/7
+    ...     print(mpf(1)/7)
     ...     with extradps(10):
-    ...         print mpf(1)/7
+    ...         print(mpf(1)/7)
     ...
     0.14285714285714285714
     0.142857142857142857142857142857
@@ -153,9 +153,9 @@ The ``workprec`` family of functions can also be used as function decorators:
 Some functions accept the ``prec`` and ``dps`` keyword arguments and this will override the global working precision. Note that this will not affect the precision at which the result is printed, so to get all digits, you must either use increase precision afterward when printing or use ``nstr``/``nprint``:
 
     >>> mp.dps = 15
-    >>> print exp(1)
+    >>> print(exp(1))
     2.71828182845905
-    >>> print exp(1, dps=50)      # Extra digits won't be printed
+    >>> print(exp(1, dps=50))      # Extra digits won't be printed
     2.71828182845905
     >>> nprint(exp(1, dps=50), 50)
     2.7182818284590452353602874713526624977572470937
@@ -165,9 +165,9 @@ Finally, instead of using the global context object ``mp``, you can create custo
     >>> mp2 = mp.clone()
     >>> mp.dps = 10
     >>> mp2.dps = 20
-    >>> print mp.mpf(1) / 3
+    >>> print(mp.mpf(1) / 3)
     0.3333333333
-    >>> print mp2.mpf(1) / 3
+    >>> print(mp2.mpf(1) / 3)
     0.33333333333333333333
 
 **Note**: the ability to create multiple contexts is a new feature that is only partially implemented. Not all mpmath functions are yet available as context-local methods. In the present version, you are likely to encounter bugs if you try mixing different contexts.
@@ -200,9 +200,9 @@ Prettier output can be obtained by using ``str()`` or ``print``, which hide the
 
     >>> mpf("3.14159")
     mpf('3.1415899999999999')
-    >>> print mpf("3.14159")
+    >>> print(mpf("3.14159"))
     3.14159
-    >>> print mpc(1j)**0.5
+    >>> print(mpc(1j)**0.5)
     (0.707106781186548 + 0.707106781186548j)
 
 Setting the ``mp.pretty`` option will use the ``str()``-style output for ``repr()`` as well:
diff --git a/doc/source/calculus/index.txt b/doc/source/calculus/index.txt
index a4cf62a..0e6e616 100644
--- a/doc/source/calculus/index.txt
+++ b/doc/source/calculus/index.txt
@@ -11,3 +11,4 @@ Numerical calculus
    integration.txt
    odes.txt
    approximation.txt
+   inverselaplace.txt
diff --git a/doc/source/calculus/inverselaplace.txt b/doc/source/calculus/inverselaplace.txt
new file mode 100644
index 0000000..76020f7
--- /dev/null
+++ b/doc/source/calculus/inverselaplace.txt
@@ -0,0 +1,64 @@
+Numerical inverse Laplace transform
+-----------------------------------
+
+One-step algorithm (``invertlaplace``)
+......................................
+
+.. autofunction:: mpmath.invertlaplace
+
+Specific algorithms
+...................
+
+Fixed Talbot algorithm
+~~~~~~~~~~~~~~~~~~~~~~
+
+.. autoclass:: mpmath.calculus.inverselaplace.FixedTalbot
+   :members:
+
+Gaver-Stehfest algorithm
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. autoclass:: mpmath.calculus.inverselaplace.Stehfest
+   :members:
+
+de Hoog, Knight & Stokes algorithm
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. autoclass:: mpmath.calculus.inverselaplace.deHoog
+   :members:
+
+Manual approach 
+...............
+
+It is possible and sometimes beneficial to re-create some of the
+functionality in ``invertlaplace``. This could be used to compute the
+Laplace-space function evaluations in a different way.  For example,
+the Laplace-space function evaluations could be the result of a
+quadrature or sum, solution to a system of ordinary differential
+equations, or possibly computed in parallel from some external library
+or function call.
+
+A trivial example showing the process (which could be implemented
+using the existing interface):
+
+>>> from mpmath import *
+>>> myTalbot = calculus.inverselaplace.FixedTalbot(mp)
+>>> t = convert(0.25)
+>>> myTalbot.calc_laplace_parameter(t)
+>>> fp = lambda p: 1/(p + 1) - 1/(p + 1000)
+>>> ft = lambda t: exp(-t) - exp(-1000*t)
+>>> fpvec = [fp(p) for p in myTalbot.p]
+>>> ft(t)-myTalbot.calc_time_domain_solution(fpvec,t,manual_prec=True)
+mpf('1.928300179528890061756872185e-21')
+
+This manual approach is also useful to look at the Laplace parameter,
+order, or working precision which were computed.
+
+>>> myTalbot.degree
+34
+
+Credit
+......
+
+The numerical inverse Laplace transform functionality was contributed
+to mpmath by Kristopher L. Kuhlman in 2017.
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 59179b0..901b485 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -21,7 +21,10 @@ sys.path.insert(0, '../..')
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax']
+
+# MathJax file, which is free to use.  See http://www.mathjax.org/docs/2.0/start.html
+# mathjax_path = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full'
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = []
@@ -34,7 +37,7 @@ master_doc = 'index'
 
 # General substitutions.
 project = 'mpmath'
-copyright = '2007-2014, Fredrik Johansson'
+copyright = '2007-2017, Fredrik Johansson and mpmath developers'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
@@ -72,10 +75,8 @@ pygments_style = 'sphinx'
 # Options for HTML output
 # -----------------------
 
-# The style sheet to use for HTML and HTML Help pages. A file of that name
-# must exist either in Sphinx' static/ path, or in one of the custom paths
-# given in html_static_path.
-html_style = 'default.css'
+# The "theme" that the HTML output should use.
+html_theme = 'classic'
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
@@ -121,11 +122,11 @@ htmlhelp_basename = 'mpmathdoc'
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, document class [howto/manual]).
-latex_documents = [master_doc, 'main.tex', 'mpmath documentation',
-                   'Fredrik Johansson \and mpmath contributors', 'manual']
+latex_documents = [(master_doc, 'main.tex', 'mpmath documentation',
+                    r'Fredrik Johansson \and mpmath contributors', 'manual')]
 
 # Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
+latex_preamble = r'\usepackage{amsfonts}'
 
 # Documents to append as an appendix to all manuals.
 #latex_appendices = []
diff --git a/doc/source/conf.py~ b/doc/source/conf.py~
deleted file mode 100644
index 3b4c0c1..0000000
--- a/doc/source/conf.py~
+++ /dev/null
@@ -1,137 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# mpmath documentation build configuration file, created by
-# sphinx-quickstart on Sun Apr 13 00:14:30 2008.
-#
-# This file is execfile()d with the current directory set to its containing dir.
-#
-# The contents of this file are pickled, so don't put values in the namespace
-# that aren't pickleable (module imports are okay, they're removed automatically).
-#
-# All configuration values have a default value; values that are commented out
-# serve to show the default value.
-
-import sys
-
-# If your extensions are in another directory, add it here.
-sys.path.insert(0, '../..')
-
-# General configuration
-# ---------------------
-
-# Add any Sphinx extension module names here, as strings. They can be extensions
-# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath']
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = []
-
-# The suffix of source filenames.
-source_suffix = '.txt'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General substitutions.
-project = 'mpmath'
-copyright = '2014, Fredrik Johansson'
-
-# The default replacements for |version| and |release|, also used in various
-# other places throughout the built documents.
-#
-# The short X.Y version.
-import mpmath
-version = mpmath.__version__
-# The full version, including alpha/beta/rc tags.
-release = mpmath.__version__
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-today_fmt = '%B %d, %Y'
-
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-
-# Options for HTML output
-# -----------------------
-
-# The style sheet to use for HTML and HTML Help pages. A file of that name
-# must exist either in Sphinx' static/ path, or in one of the custom paths
-# given in html_static_path.
-html_style = 'default.css'
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = []
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
-html_last_updated_fmt = '%b %d, %Y'
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Content template for the index page.
-#html_index = ''
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_use_modindex = True
-
-# If true, the reST sources are included in the HTML build as _sources/<name>.
-#html_copy_source = True
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'mpmathdoc'
-
-
-# Options for LaTeX output
-# ------------------------
-
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author, document class [howto/manual]).
-latex_documents = [master_doc, 'main.tex', 'mpmath documentation',
-                   'Fredrik Johansson \and mpmath contributors', 'manual']
-
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_use_modindex = True
-
-default_role = 'math'
-pngmath_dvipng_args = ['-gamma 1.5', '-D 110']
diff --git a/doc/source/contexts.txt b/doc/source/contexts.txt
index 8290f05..5e5268c 100644
--- a/doc/source/contexts.txt
+++ b/doc/source/contexts.txt
@@ -128,7 +128,7 @@ Intervals can be created from single numbers (treated as zero-width intervals) o
     >>> iv.dps = 15; iv.pretty = False
     >>> iv.mpf(3)
     mpi('3.0', '3.0')
-    >>> print iv.mpf(3)
+    >>> print(iv.mpf(3))
     [3.0, 3.0]
     >>> iv.pretty = True
     >>> iv.mpf([2,3])
@@ -144,7 +144,7 @@ The fact that ``'0.1'`` results in an interval of nonzero width indicates that 1
 
 Intervals may be infinite or half-infinite::
 
-    >>> print 1 / iv.mpf([2, 'inf'])
+    >>> print(1 / iv.mpf([2, 'inf']))
     [0.0, 0.5]
 
 The equality testing operators ``==`` and ``!=`` check whether their operands are identical as intervals; that is, have the same endpoints. The ordering operators ``< <= > >=`` permit inequality testing using triple-valued logic: a guaranteed inequality returns ``True`` or ``False`` while an indeterminate inequality returns ``None``::
@@ -225,9 +225,9 @@ Naive use of ``mp`` arithmetic may result in wrong conclusions, such as the foll
     >>> mp.dps = 25
     >>> x = mp.exp(mp.pi*mp.sqrt(163))
     >>> y = mp.mpf(640320**3+744)
-    >>> print x
+    >>> print(x)
     262537412640768744.0000001
-    >>> print y
+    >>> print(y)
     262537412640768744.0
     >>> x > y
     True
@@ -236,7 +236,7 @@ But the correct result is `e^{\pi \sqrt{163}} < 262537412640768744`, as can be
 seen by increasing the precision::
 
     >>> mp.dps = 50
-    >>> print mp.exp(mp.pi*mp.sqrt(163))
+    >>> print(mp.exp(mp.pi*mp.sqrt(163)))
     262537412640768743.99999999999925007259719818568888
 
 With interval arithmetic, the comparison returns ``None`` until the precision
@@ -259,34 +259,34 @@ Although mpmath is generally designed for arbitrary-precision arithmetic, many o
 To take advantage of this feature, simply use the ``fp`` prefix, i.e. write ``fp.func`` instead of ``func`` or ``mp.func``::
 
     >>> u = fp.erfc(2.5)
-    >>> print u
+    >>> print(u)  # doctest:+SKIP
     0.000406952017445
-    >>> type(u)
+    >>> type(u)  # doctest:+SKIP
     <type 'float'>
     >>> mp.dps = 15
-    >>> print mp.erfc(2.5)
+    >>> print(mp.erfc(2.5))
     0.000406952017444959
     >>> fp.matrix([[1,2],[3,4]]) ** 2
     matrix(
     [['7.0', '10.0'],
      ['15.0', '22.0']])
     >>> 
-    >>> type(_[0,0])
+    >>> type(_[0,0])  # doctest:+SKIP
     <type 'float'>
-    >>> print fp.quad(fp.sin, [0, fp.pi])    # numerical integration
+    >>> print(fp.quad(fp.sin, [0, fp.pi]))    # numerical integration
     2.0
 
 The ``fp`` context wraps Python's ``math`` and ``cmath`` modules for elementary functions. It supports both real and complex numbers and automatically generates complex results for real inputs (``math`` raises an exception)::
 
-    >>> fp.sqrt(5)
+    >>> fp.sqrt(5)  # doctest:+SKIP
     2.23606797749979
-    >>> fp.sqrt(-5)
+    >>> fp.sqrt(-5)  # doctest:+SKIP
     2.23606797749979j
-    >>> fp.sin(10)
+    >>> fp.sin(10)  # doctest:+SKIP
     -0.5440211108893698
-    >>> fp.power(-1, 0.25)
+    >>> fp.power(-1, 0.25)  # doctest:+SKIP
     (0.7071067811865476+0.7071067811865475j)
-    >>> (-1) ** 0.25
+    >>> (-1) ** 0.25  # doctest:+SKIP
     Traceback (most recent call last):
       ...
     ValueError: negative number cannot be raised to a fractional power
diff --git a/doc/source/functions/gamma.txt b/doc/source/functions/gamma.txt
index 9d15764..b1bf527 100644
--- a/doc/source/functions/gamma.txt
+++ b/doc/source/functions/gamma.txt
@@ -5,16 +5,15 @@ Factorials and factorial-like sums and products are basic tools of combinatorics
 
 A large selection of factorial-like functions is implemented in mpmath. All functions support complex arguments, and arguments may be arbitrarily large. Results are numerical approximations, so to compute *exact* values a high enough precision must be set manually::
 
+    >>> from mpmath import mp, fac
     >>> mp.dps = 15; mp.pretty = True
     >>> fac(100)
     9.33262154439442e+157
-    >>> print int(_)    # most digits are wrong
-    93326215443944150965646704795953882578400970373184098831012889540582227238570431
-    295066113089288327277825849664006524270554535976289719382852181865895959724032
+    >>> print(int(_))    # most digits are wrong
+    93326215443944150965646704795953882578400970373184098831012889540582227238570431295066113089288327277825849664006524270554535976289719382852181865895959724032
     >>> mp.dps = 160
     >>> fac(100)
-    93326215443944152681699238856266700490715968264381621468592963895217599993229915
-    608941463976156518286253697920827223758251185210916864000000000000000000000000.0
+    93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000.0
 
 The gamma and polygamma functions are closely related to :doc:`zeta`. See also :doc:`qfunctions` for q-analogs of factorial-like functions.
 
diff --git a/doc/source/general.txt~ b/doc/source/general.txt~
deleted file mode 100644
index 2d7e930..0000000
--- a/doc/source/general.txt~
+++ /dev/null
@@ -1,228 +0,0 @@
-Utility functions
-===============================================
-
-This page lists functions that perform basic operations
-on numbers or aid general programming.
-
-Conversion and printing
------------------------
-
-:func:`mpmathify` / :func:`convert`
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.mpmathify(x, strings=True)
-
-:func:`nstr`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.nstr(x, n=6, **kwargs)
-
-:func:`nprint`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.nprint(x, n=6, **kwargs)
-
-Arithmetic operations
----------------------
-
-See also :func:`mpmath.sqrt`, :func:`mpmath.exp` etc., listed
-in :doc:`functions/powers`
-
-:func:`fadd`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fadd
-
-:func:`fsub`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fsub
-
-:func:`fneg`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fneg
-
-:func:`fmul`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fmul
-
-:func:`fdiv`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fdiv
-
-:func:`fmod`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fmod(x, y)
-
-:func:`fsum`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fsum(terms, absolute=False, squared=False)
-
-:func:`fprod`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fprod(factors)
-
-:func:`fdot`
-^^^^^^^^^^^^^
-.. autofunction:: mpmath.fdot(A, B=None, conjugate=False)
-
-Complex components
-------------------
-
-:func:`fabs`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.fabs(x)
-
-:func:`sign`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.sign(x)
-
-:func:`re`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.re(x)
-
-:func:`im`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.im(x)
-
-:func:`arg`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.arg(x)
-
-:func:`conj`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.conj(x)
-
-:func:`polar`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.polar(x)
-
-:func:`rect`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.rect(x)
-
-Integer and fractional parts
------------------------------
-
-:func:`floor`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.floor(x)
-
-:func:`ceil`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.ceil(x)
-
-:func:`nint`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.nint(x)
-
-:func:`frac`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.frac(x)
-
-Tolerances and approximate comparisons
---------------------------------------
-
-:func:`chop`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.chop(x, tol=None)
-
-:func:`almosteq`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.almosteq(s, t, rel_eps=None, abs_eps=None)
-
-Properties of numbers
--------------------------------------
-
-:func:`isinf`
-^^^^^^^^^^^^^^^^^^^^
-.. autofunction:: mpmath.isinf(x)
... 4509 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/mpmath.git



More information about the Python-modules-commits mailing list