SciPy

This is documentation for an old release of SciPy (version 1.5.3). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.special.spence

scipy.special.spence(z, out=None) = <ufunc 'spence'>

Spence’s function, also known as the dilogarithm.

It is defined to be

\[\int_0^z \frac{\log(t)}{1 - t}dt\]

for complex \(z\), where the contour of integration is taken to avoid the branch cut of the logarithm. Spence’s function is analytic everywhere except the negative real axis where it has a branch cut.

Parameters
zarray_like

Points at which to evaluate Spence’s function

Returns
sndarray

Computed values of Spence’s function

Notes

There is a different convention which defines Spence’s function by the integral

\[-\int_0^z \frac{\log(1 - t)}{t}dt;\]

this is our spence(1 - z).

Previous topic

scipy.special.log_softmax

Next topic

scipy.special.zeta