Files
Sergey B Kirpichev fb69943530 Use explicit kwargs in public API, where possible
Following functions kept:
```pycon
>>> import inspect
... with_args = []
... with_kwargs = []
... for n in dir(mpmath):
...     m = getattr(mpmath, n)
...     try:
...         s = inspect.signature(m)
...     except:
...         continue
...     if any(_.kind == inspect._ParameterKind.VAR_POSITIONAL for _ in s.parameters.values()):
...         for name in s.parameters:
...             if s.parameters[name].kind == inspect._ParameterKind.VAR_POSITIONAL and name == 'args':
...                 with_args.append(n)
...                 break
...     if any(_.kind == inspect._ParameterKind.VAR_KEYWORD for _ in s.parameters.values()):
...         with_kwargs.append(n)
... print(with_args)
... print(with_kwargs)
...
['arange', 'ellipe', 'ellippi', 'linspace', 'matrix', 'ones', 'timing', 'zeros']
['multiplicity', 'timing']
```

We need support for multiple signatures in the first case.  In the
second - it's impossible to implement these functions without kwargs.

Closes #1056
2026-08-04 06:40:53 +03:00

46 lines
802 B
ReStructuredText

Powers and logarithms
---------------------
Nth roots
.........
.. autofunction:: mpmath.sqrt
.. autofunction:: mpmath.hypot
.. autofunction:: mpmath.cbrt
.. autofunction:: mpmath.root
.. autofunction:: mpmath.unitroots
Exponentiation
..............
.. autofunction:: mpmath.exp
.. autofunction:: mpmath.exp2
.. autofunction:: mpmath.power
.. autofunction:: mpmath.expj
.. autofunction:: mpmath.expjpi
.. autofunction:: mpmath.expm1
.. autofunction:: mpmath.powm1
Logarithms
..........
.. autofunction:: mpmath.log
.. autofunction:: mpmath.ln
.. autofunction:: mpmath.log2
.. autofunction:: mpmath.log10
.. autofunction:: mpmath.log1p
Lambert W function
..................
.. autofunction:: mpmath.lambertw
Arithmetic-geometric mean
.........................
.. autofunction:: mpmath.agm