Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/scipy/special/__init__.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2========================================
3Special functions (:mod:`scipy.special`)
4========================================
6.. currentmodule:: scipy.special
8Nearly all of the functions below are universal functions and follow
9broadcasting and automatic array-looping rules.
11.. seealso::
13 `scipy.special.cython_special` -- Typed Cython versions of special functions
16Error handling
17==============
19Errors are handled by returning NaNs or other appropriate values.
20Some of the special function routines can emit warnings or raise
21exceptions when an error occurs. By default this is disabled; to
22query and control the current error handling state the following
23functions are provided.
25.. autosummary::
26 :toctree: generated/
28 geterr -- Get the current way of handling special-function errors.
29 seterr -- Set how special-function errors are handled.
30 errstate -- Context manager for special-function error handling.
31 SpecialFunctionWarning -- Warning that can be emitted by special functions.
32 SpecialFunctionError -- Exception that can be raised by special functions.
34Available functions
35===================
37Airy functions
38--------------
40.. autosummary::
41 :toctree: generated/
43 airy -- Airy functions and their derivatives.
44 airye -- Exponentially scaled Airy functions and their derivatives.
45 ai_zeros -- Compute `nt` zeros and values of the Airy function Ai and its derivative.
46 bi_zeros -- Compute `nt` zeros and values of the Airy function Bi and its derivative.
47 itairy -- Integrals of Airy functions
50Elliptic functions and integrals
51--------------------------------
53.. autosummary::
54 :toctree: generated/
56 ellipj -- Jacobian elliptic functions.
57 ellipk -- Complete elliptic integral of the first kind.
58 ellipkm1 -- Complete elliptic integral of the first kind around `m` = 1.
59 ellipkinc -- Incomplete elliptic integral of the first kind.
60 ellipe -- Complete elliptic integral of the second kind.
61 ellipeinc -- Incomplete elliptic integral of the second kind.
63Bessel functions
64----------------
66.. autosummary::
67 :toctree: generated/
69 jv -- Bessel function of the first kind of real order and complex argument.
70 jve -- Exponentially scaled Bessel function of order `v`.
71 yn -- Bessel function of the second kind of integer order and real argument.
72 yv -- Bessel function of the second kind of real order and complex argument.
73 yve -- Exponentially scaled Bessel function of the second kind of real order.
74 kn -- Modified Bessel function of the second kind of integer order `n`
75 kv -- Modified Bessel function of the second kind of real order `v`
76 kve -- Exponentially scaled modified Bessel function of the second kind.
77 iv -- Modified Bessel function of the first kind of real order.
78 ive -- Exponentially scaled modified Bessel function of the first kind.
79 hankel1 -- Hankel function of the first kind.
80 hankel1e -- Exponentially scaled Hankel function of the first kind.
81 hankel2 -- Hankel function of the second kind.
82 hankel2e -- Exponentially scaled Hankel function of the second kind.
84The following is not an universal function:
86.. autosummary::
87 :toctree: generated/
89 lmbda -- Jahnke-Emden Lambda function, Lambdav(x).
91Zeros of Bessel functions
92^^^^^^^^^^^^^^^^^^^^^^^^^
94These are not universal functions:
96.. autosummary::
97 :toctree: generated/
99 jnjnp_zeros -- Compute zeros of integer-order Bessel functions Jn and Jn'.
100 jnyn_zeros -- Compute nt zeros of Bessel functions Jn(x), Jn'(x), Yn(x), and Yn'(x).
101 jn_zeros -- Compute zeros of integer-order Bessel function Jn(x).
102 jnp_zeros -- Compute zeros of integer-order Bessel function derivative Jn'(x).
103 yn_zeros -- Compute zeros of integer-order Bessel function Yn(x).
104 ynp_zeros -- Compute zeros of integer-order Bessel function derivative Yn'(x).
105 y0_zeros -- Compute nt zeros of Bessel function Y0(z), and derivative at each zero.
106 y1_zeros -- Compute nt zeros of Bessel function Y1(z), and derivative at each zero.
107 y1p_zeros -- Compute nt zeros of Bessel derivative Y1'(z), and value at each zero.
109Faster versions of common Bessel functions
110^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112.. autosummary::
113 :toctree: generated/
115 j0 -- Bessel function of the first kind of order 0.
116 j1 -- Bessel function of the first kind of order 1.
117 y0 -- Bessel function of the second kind of order 0.
118 y1 -- Bessel function of the second kind of order 1.
119 i0 -- Modified Bessel function of order 0.
120 i0e -- Exponentially scaled modified Bessel function of order 0.
121 i1 -- Modified Bessel function of order 1.
122 i1e -- Exponentially scaled modified Bessel function of order 1.
123 k0 -- Modified Bessel function of the second kind of order 0, :math:`K_0`.
124 k0e -- Exponentially scaled modified Bessel function K of order 0
125 k1 -- Modified Bessel function of the second kind of order 1, :math:`K_1(x)`.
126 k1e -- Exponentially scaled modified Bessel function K of order 1.
128Integrals of Bessel functions
129^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131.. autosummary::
132 :toctree: generated/
134 itj0y0 -- Integrals of Bessel functions of order 0.
135 it2j0y0 -- Integrals related to Bessel functions of order 0.
136 iti0k0 -- Integrals of modified Bessel functions of order 0.
137 it2i0k0 -- Integrals related to modified Bessel functions of order 0.
138 besselpoly -- Weighted integral of a Bessel function.
140Derivatives of Bessel functions
141^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143.. autosummary::
144 :toctree: generated/
146 jvp -- Compute nth derivative of Bessel function Jv(z) with respect to `z`.
147 yvp -- Compute nth derivative of Bessel function Yv(z) with respect to `z`.
148 kvp -- Compute nth derivative of real-order modified Bessel function Kv(z)
149 ivp -- Compute nth derivative of modified Bessel function Iv(z) with respect to `z`.
150 h1vp -- Compute nth derivative of Hankel function H1v(z) with respect to `z`.
151 h2vp -- Compute nth derivative of Hankel function H2v(z) with respect to `z`.
153Spherical Bessel functions
154^^^^^^^^^^^^^^^^^^^^^^^^^^
156.. autosummary::
157 :toctree: generated/
159 spherical_jn -- Spherical Bessel function of the first kind or its derivative.
160 spherical_yn -- Spherical Bessel function of the second kind or its derivative.
161 spherical_in -- Modified spherical Bessel function of the first kind or its derivative.
162 spherical_kn -- Modified spherical Bessel function of the second kind or its derivative.
164Riccati-Bessel functions
165^^^^^^^^^^^^^^^^^^^^^^^^
167These are not universal functions:
169.. autosummary::
170 :toctree: generated/
172 riccati_jn -- Compute Ricatti-Bessel function of the first kind and its derivative.
173 riccati_yn -- Compute Ricatti-Bessel function of the second kind and its derivative.
175Struve functions
176----------------
178.. autosummary::
179 :toctree: generated/
181 struve -- Struve function.
182 modstruve -- Modified Struve function.
183 itstruve0 -- Integral of the Struve function of order 0.
184 it2struve0 -- Integral related to the Struve function of order 0.
185 itmodstruve0 -- Integral of the modified Struve function of order 0.
188Raw statistical functions
189-------------------------
191.. seealso:: :mod:`scipy.stats`: Friendly versions of these functions.
193.. autosummary::
194 :toctree: generated/
196 bdtr -- Binomial distribution cumulative distribution function.
197 bdtrc -- Binomial distribution survival function.
198 bdtri -- Inverse function to `bdtr` with respect to `p`.
199 bdtrik -- Inverse function to `bdtr` with respect to `k`.
200 bdtrin -- Inverse function to `bdtr` with respect to `n`.
201 btdtr -- Cumulative distribution function of the beta distribution.
202 btdtri -- The `p`-th quantile of the beta distribution.
203 btdtria -- Inverse of `btdtr` with respect to `a`.
204 btdtrib -- btdtria(a, p, x).
205 fdtr -- F cumulative distribution function.
206 fdtrc -- F survival function.
207 fdtri -- The `p`-th quantile of the F-distribution.
208 fdtridfd -- Inverse to `fdtr` vs dfd.
209 gdtr -- Gamma distribution cumulative distribution function.
210 gdtrc -- Gamma distribution survival function.
211 gdtria -- Inverse of `gdtr` vs a.
212 gdtrib -- Inverse of `gdtr` vs b.
213 gdtrix -- Inverse of `gdtr` vs x.
214 nbdtr -- Negative binomial cumulative distribution function.
215 nbdtrc -- Negative binomial survival function.
216 nbdtri -- Inverse of `nbdtr` vs `p`.
217 nbdtrik -- Inverse of `nbdtr` vs `k`.
218 nbdtrin -- Inverse of `nbdtr` vs `n`.
219 ncfdtr -- Cumulative distribution function of the non-central F distribution.
220 ncfdtridfd -- Calculate degrees of freedom (denominator) for the noncentral F-distribution.
221 ncfdtridfn -- Calculate degrees of freedom (numerator) for the noncentral F-distribution.
222 ncfdtri -- Inverse cumulative distribution function of the non-central F distribution.
223 ncfdtrinc -- Calculate non-centrality parameter for non-central F distribution.
224 nctdtr -- Cumulative distribution function of the non-central `t` distribution.
225 nctdtridf -- Calculate degrees of freedom for non-central t distribution.
226 nctdtrit -- Inverse cumulative distribution function of the non-central t distribution.
227 nctdtrinc -- Calculate non-centrality parameter for non-central t distribution.
228 nrdtrimn -- Calculate mean of normal distribution given other params.
229 nrdtrisd -- Calculate standard deviation of normal distribution given other params.
230 pdtr -- Poisson cumulative distribution function.
231 pdtrc -- Poisson survival function.
232 pdtri -- Inverse to `pdtr` vs m.
233 pdtrik -- Inverse to `pdtr` vs k.
234 stdtr -- Student t distribution cumulative distribution function.
235 stdtridf -- Inverse of `stdtr` vs df.
236 stdtrit -- Inverse of `stdtr` vs `t`.
237 chdtr -- Chi square cumulative distribution function.
238 chdtrc -- Chi square survival function.
239 chdtri -- Inverse to `chdtrc`.
240 chdtriv -- Inverse to `chdtr` vs `v`.
241 ndtr -- Gaussian cumulative distribution function.
242 log_ndtr -- Logarithm of Gaussian cumulative distribution function.
243 ndtri -- Inverse of `ndtr` vs x.
244 chndtr -- Non-central chi square cumulative distribution function.
245 chndtridf -- Inverse to `chndtr` vs `df`.
246 chndtrinc -- Inverse to `chndtr` vs `nc`.
247 chndtrix -- Inverse to `chndtr` vs `x`.
248 smirnov -- Kolmogorov-Smirnov complementary cumulative distribution function.
249 smirnovi -- Inverse to `smirnov`.
250 kolmogorov -- Complementary cumulative distribution function of Kolmogorov distribution.
251 kolmogi -- Inverse function to `kolmogorov`.
252 tklmbda -- Tukey-Lambda cumulative distribution function.
253 logit -- Logit ufunc for ndarrays.
254 expit -- Expit ufunc for ndarrays.
255 boxcox -- Compute the Box-Cox transformation.
256 boxcox1p -- Compute the Box-Cox transformation of 1 + `x`.
257 inv_boxcox -- Compute the inverse of the Box-Cox transformation.
258 inv_boxcox1p -- Compute the inverse of the Box-Cox transformation.
259 owens_t -- Owen's T Function.
262Information Theory functions
263----------------------------
265.. autosummary::
266 :toctree: generated/
268 entr -- Elementwise function for computing entropy.
269 rel_entr -- Elementwise function for computing relative entropy.
270 kl_div -- Elementwise function for computing Kullback-Leibler divergence.
271 huber -- Huber loss function.
272 pseudo_huber -- Pseudo-Huber loss function.
275Gamma and related functions
276---------------------------
278.. autosummary::
279 :toctree: generated/
281 gamma -- Gamma function.
282 gammaln -- Logarithm of the absolute value of the Gamma function for real inputs.
283 loggamma -- Principal branch of the logarithm of the Gamma function.
284 gammasgn -- Sign of the gamma function.
285 gammainc -- Regularized lower incomplete gamma function.
286 gammaincinv -- Inverse to `gammainc`.
287 gammaincc -- Regularized upper incomplete gamma function.
288 gammainccinv -- Inverse to `gammaincc`.
289 beta -- Beta function.
290 betaln -- Natural logarithm of absolute value of beta function.
291 betainc -- Incomplete beta integral.
292 betaincinv -- Inverse function to beta integral.
293 psi -- The digamma function.
294 rgamma -- Gamma function inverted.
295 polygamma -- Polygamma function n.
296 multigammaln -- Returns the log of multivariate gamma, also sometimes called the generalized gamma.
297 digamma -- psi(x[, out]).
298 poch -- Rising factorial (z)_m.
301Error function and Fresnel integrals
302------------------------------------
304.. autosummary::
305 :toctree: generated/
307 erf -- Returns the error function of complex argument.
308 erfc -- Complementary error function, ``1 - erf(x)``.
309 erfcx -- Scaled complementary error function, ``exp(x**2) * erfc(x)``.
310 erfi -- Imaginary error function, ``-i erf(i z)``.
311 erfinv -- Inverse function for erf.
312 erfcinv -- Inverse function for erfc.
313 wofz -- Faddeeva function.
314 dawsn -- Dawson's integral.
315 fresnel -- Fresnel sin and cos integrals.
316 fresnel_zeros -- Compute nt complex zeros of sine and cosine Fresnel integrals S(z) and C(z).
317 modfresnelp -- Modified Fresnel positive integrals.
318 modfresnelm -- Modified Fresnel negative integrals.
319 voigt_profile -- Voigt profile.
321These are not universal functions:
323.. autosummary::
324 :toctree: generated/
326 erf_zeros -- Compute nt complex zeros of error function erf(z).
327 fresnelc_zeros -- Compute nt complex zeros of cosine Fresnel integral C(z).
328 fresnels_zeros -- Compute nt complex zeros of sine Fresnel integral S(z).
330Legendre functions
331------------------
333.. autosummary::
334 :toctree: generated/
336 lpmv -- Associated Legendre function of integer order and real degree.
337 sph_harm -- Compute spherical harmonics.
339These are not universal functions:
341.. autosummary::
342 :toctree: generated/
344 clpmn -- Associated Legendre function of the first kind for complex arguments.
345 lpn -- Legendre function of the first kind.
346 lqn -- Legendre function of the second kind.
347 lpmn -- Sequence of associated Legendre functions of the first kind.
348 lqmn -- Sequence of associated Legendre functions of the second kind.
350Ellipsoidal harmonics
351---------------------
353.. autosummary::
354 :toctree: generated/
356 ellip_harm -- Ellipsoidal harmonic functions E^p_n(l).
357 ellip_harm_2 -- Ellipsoidal harmonic functions F^p_n(l).
358 ellip_normal -- Ellipsoidal harmonic normalization constants gamma^p_n.
360Orthogonal polynomials
361----------------------
363The following functions evaluate values of orthogonal polynomials:
365.. autosummary::
366 :toctree: generated/
368 assoc_laguerre -- Compute the generalized (associated) Laguerre polynomial of degree n and order k.
369 eval_legendre -- Evaluate Legendre polynomial at a point.
370 eval_chebyt -- Evaluate Chebyshev polynomial of the first kind at a point.
371 eval_chebyu -- Evaluate Chebyshev polynomial of the second kind at a point.
372 eval_chebyc -- Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a point.
373 eval_chebys -- Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a point.
374 eval_jacobi -- Evaluate Jacobi polynomial at a point.
375 eval_laguerre -- Evaluate Laguerre polynomial at a point.
376 eval_genlaguerre -- Evaluate generalized Laguerre polynomial at a point.
377 eval_hermite -- Evaluate physicist's Hermite polynomial at a point.
378 eval_hermitenorm -- Evaluate probabilist's (normalized) Hermite polynomial at a point.
379 eval_gegenbauer -- Evaluate Gegenbauer polynomial at a point.
380 eval_sh_legendre -- Evaluate shifted Legendre polynomial at a point.
381 eval_sh_chebyt -- Evaluate shifted Chebyshev polynomial of the first kind at a point.
382 eval_sh_chebyu -- Evaluate shifted Chebyshev polynomial of the second kind at a point.
383 eval_sh_jacobi -- Evaluate shifted Jacobi polynomial at a point.
385The following functions compute roots and quadrature weights for
386orthogonal polynomials:
388.. autosummary::
389 :toctree: generated/
391 roots_legendre -- Gauss-Legendre quadrature.
392 roots_chebyt -- Gauss-Chebyshev (first kind) quadrature.
393 roots_chebyu -- Gauss-Chebyshev (second kind) quadrature.
394 roots_chebyc -- Gauss-Chebyshev (first kind) quadrature.
395 roots_chebys -- Gauss-Chebyshev (second kind) quadrature.
396 roots_jacobi -- Gauss-Jacobi quadrature.
397 roots_laguerre -- Gauss-Laguerre quadrature.
398 roots_genlaguerre -- Gauss-generalized Laguerre quadrature.
399 roots_hermite -- Gauss-Hermite (physicst's) quadrature.
400 roots_hermitenorm -- Gauss-Hermite (statistician's) quadrature.
401 roots_gegenbauer -- Gauss-Gegenbauer quadrature.
402 roots_sh_legendre -- Gauss-Legendre (shifted) quadrature.
403 roots_sh_chebyt -- Gauss-Chebyshev (first kind, shifted) quadrature.
404 roots_sh_chebyu -- Gauss-Chebyshev (second kind, shifted) quadrature.
405 roots_sh_jacobi -- Gauss-Jacobi (shifted) quadrature.
407The functions below, in turn, return the polynomial coefficients in
408``orthopoly1d`` objects, which function similarly as `numpy.poly1d`.
409The ``orthopoly1d`` class also has an attribute ``weights``, which returns
410the roots, weights, and total weights for the appropriate form of Gaussian
411quadrature. These are returned in an ``n x 3`` array with roots in the first
412column, weights in the second column, and total weights in the final column.
413Note that ``orthopoly1d`` objects are converted to `~numpy.poly1d` when doing
414arithmetic, and lose information of the original orthogonal polynomial.
416.. autosummary::
417 :toctree: generated/
419 legendre -- Legendre polynomial.
420 chebyt -- Chebyshev polynomial of the first kind.
421 chebyu -- Chebyshev polynomial of the second kind.
422 chebyc -- Chebyshev polynomial of the first kind on :math:`[-2, 2]`.
423 chebys -- Chebyshev polynomial of the second kind on :math:`[-2, 2]`.
424 jacobi -- Jacobi polynomial.
425 laguerre -- Laguerre polynomial.
426 genlaguerre -- Generalized (associated) Laguerre polynomial.
427 hermite -- Physicist's Hermite polynomial.
428 hermitenorm -- Normalized (probabilist's) Hermite polynomial.
429 gegenbauer -- Gegenbauer (ultraspherical) polynomial.
430 sh_legendre -- Shifted Legendre polynomial.
431 sh_chebyt -- Shifted Chebyshev polynomial of the first kind.
432 sh_chebyu -- Shifted Chebyshev polynomial of the second kind.
433 sh_jacobi -- Shifted Jacobi polynomial.
435.. warning::
437 Computing values of high-order polynomials (around ``order > 20``) using
438 polynomial coefficients is numerically unstable. To evaluate polynomial
439 values, the ``eval_*`` functions should be used instead.
442Hypergeometric functions
443------------------------
445.. autosummary::
446 :toctree: generated/
448 hyp2f1 -- Gauss hypergeometric function 2F1(a, b; c; z).
449 hyp1f1 -- Confluent hypergeometric function 1F1(a, b; x).
450 hyperu -- Confluent hypergeometric function U(a, b, x) of the second kind.
451 hyp0f1 -- Confluent hypergeometric limit function 0F1.
454Parabolic cylinder functions
455----------------------------
457.. autosummary::
458 :toctree: generated/
460 pbdv -- Parabolic cylinder function D.
461 pbvv -- Parabolic cylinder function V.
462 pbwa -- Parabolic cylinder function W.
464These are not universal functions:
466.. autosummary::
467 :toctree: generated/
469 pbdv_seq -- Parabolic cylinder functions Dv(x) and derivatives.
470 pbvv_seq -- Parabolic cylinder functions Vv(x) and derivatives.
471 pbdn_seq -- Parabolic cylinder functions Dn(z) and derivatives.
473Mathieu and related functions
474-----------------------------
476.. autosummary::
477 :toctree: generated/
479 mathieu_a -- Characteristic value of even Mathieu functions.
480 mathieu_b -- Characteristic value of odd Mathieu functions.
482These are not universal functions:
484.. autosummary::
485 :toctree: generated/
487 mathieu_even_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
488 mathieu_odd_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
490The following return both function and first derivative:
492.. autosummary::
493 :toctree: generated/
495 mathieu_cem -- Even Mathieu function and its derivative.
496 mathieu_sem -- Odd Mathieu function and its derivative.
497 mathieu_modcem1 -- Even modified Mathieu function of the first kind and its derivative.
498 mathieu_modcem2 -- Even modified Mathieu function of the second kind and its derivative.
499 mathieu_modsem1 -- Odd modified Mathieu function of the first kind and its derivative.
500 mathieu_modsem2 -- Odd modified Mathieu function of the second kind and its derivative.
502Spheroidal wave functions
503-------------------------
505.. autosummary::
506 :toctree: generated/
508 pro_ang1 -- Prolate spheroidal angular function of the first kind and its derivative.
509 pro_rad1 -- Prolate spheroidal radial function of the first kind and its derivative.
510 pro_rad2 -- Prolate spheroidal radial function of the secon kind and its derivative.
511 obl_ang1 -- Oblate spheroidal angular function of the first kind and its derivative.
512 obl_rad1 -- Oblate spheroidal radial function of the first kind and its derivative.
513 obl_rad2 -- Oblate spheroidal radial function of the second kind and its derivative.
514 pro_cv -- Characteristic value of prolate spheroidal function.
515 obl_cv -- Characteristic value of oblate spheroidal function.
516 pro_cv_seq -- Characteristic values for prolate spheroidal wave functions.
517 obl_cv_seq -- Characteristic values for oblate spheroidal wave functions.
519The following functions require pre-computed characteristic value:
521.. autosummary::
522 :toctree: generated/
524 pro_ang1_cv -- Prolate spheroidal angular function pro_ang1 for precomputed characteristic value.
525 pro_rad1_cv -- Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.
526 pro_rad2_cv -- Prolate spheroidal radial function pro_rad2 for precomputed characteristic value.
527 obl_ang1_cv -- Oblate spheroidal angular function obl_ang1 for precomputed characteristic value.
528 obl_rad1_cv -- Oblate spheroidal radial function obl_rad1 for precomputed characteristic value.
529 obl_rad2_cv -- Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.
531Kelvin functions
532----------------
534.. autosummary::
535 :toctree: generated/
537 kelvin -- Kelvin functions as complex numbers.
538 kelvin_zeros -- Compute nt zeros of all Kelvin functions.
539 ber -- Kelvin function ber.
540 bei -- Kelvin function bei
541 berp -- Derivative of the Kelvin function `ber`.
542 beip -- Derivative of the Kelvin function `bei`.
543 ker -- Kelvin function ker.
544 kei -- Kelvin function ker.
545 kerp -- Derivative of the Kelvin function ker.
546 keip -- Derivative of the Kelvin function kei.
548These are not universal functions:
550.. autosummary::
551 :toctree: generated/
553 ber_zeros -- Compute nt zeros of the Kelvin function ber(x).
554 bei_zeros -- Compute nt zeros of the Kelvin function bei(x).
555 berp_zeros -- Compute nt zeros of the Kelvin function ber'(x).
556 beip_zeros -- Compute nt zeros of the Kelvin function bei'(x).
557 ker_zeros -- Compute nt zeros of the Kelvin function ker(x).
558 kei_zeros -- Compute nt zeros of the Kelvin function kei(x).
559 kerp_zeros -- Compute nt zeros of the Kelvin function ker'(x).
560 keip_zeros -- Compute nt zeros of the Kelvin function kei'(x).
562Combinatorics
563-------------
565.. autosummary::
566 :toctree: generated/
568 comb -- The number of combinations of N things taken k at a time.
569 perm -- Permutations of N things taken k at a time, i.e., k-permutations of N.
571Lambert W and related functions
572-------------------------------
574.. autosummary::
575 :toctree: generated/
577 lambertw -- Lambert W function.
578 wrightomega -- Wright Omega function.
580Other special functions
581-----------------------
583.. autosummary::
584 :toctree: generated/
586 agm -- Arithmetic, Geometric Mean.
587 bernoulli -- Bernoulli numbers B0..Bn (inclusive).
588 binom -- Binomial coefficient
589 diric -- Periodic sinc function, also called the Dirichlet function.
590 euler -- Euler numbers E0..En (inclusive).
591 expn -- Exponential integral E_n.
592 exp1 -- Exponential integral E_1 of complex argument z.
593 expi -- Exponential integral Ei.
594 factorial -- The factorial of a number or array of numbers.
595 factorial2 -- Double factorial.
596 factorialk -- Multifactorial of n of order k, n(!!...!).
597 shichi -- Hyperbolic sine and cosine integrals.
598 sici -- Sine and cosine integrals.
599 softmax -- Softmax function.
600 log_softmax -- Logarithm of softmax function.
601 spence -- Spence's function, also known as the dilogarithm.
602 zeta -- Riemann zeta function.
603 zetac -- Riemann zeta function minus 1.
605Convenience functions
606---------------------
608.. autosummary::
609 :toctree: generated/
611 cbrt -- Cube root of `x`.
612 exp10 -- 10**x.
613 exp2 -- 2**x.
614 radian -- Convert from degrees to radians.
615 cosdg -- Cosine of the angle `x` given in degrees.
616 sindg -- Sine of angle given in degrees.
617 tandg -- Tangent of angle x given in degrees.
618 cotdg -- Cotangent of the angle `x` given in degrees.
619 log1p -- Calculates log(1+x) for use when `x` is near zero.
620 expm1 -- exp(x) - 1 for use when `x` is near zero.
621 cosm1 -- cos(x) - 1 for use when `x` is near zero.
622 round -- Round to nearest integer.
623 xlogy -- Compute ``x*log(y)`` so that the result is 0 if ``x = 0``.
624 xlog1py -- Compute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.
625 logsumexp -- Compute the log of the sum of exponentials of input elements.
626 exprel -- Relative error exponential, (exp(x)-1)/x, for use when `x` is near zero.
627 sinc -- Return the sinc function.
629"""
631from .sf_error import SpecialFunctionWarning, SpecialFunctionError
633from . import _ufuncs
634from ._ufuncs import *
636from . import _basic
637from ._basic import *
639from ._logsumexp import logsumexp, softmax, log_softmax
641from . import orthogonal
642from .orthogonal import *
644from .spfun_stats import multigammaln
645from ._ellip_harm import (
646 ellip_harm,
647 ellip_harm_2,
648 ellip_normal
649)
650from ._lambertw import lambertw
651from ._spherical_bessel import (
652 spherical_jn,
653 spherical_yn,
654 spherical_in,
655 spherical_kn
656)
658__all__ = _ufuncs.__all__ + _basic.__all__ + orthogonal.__all__ + [
659 'SpecialFunctionWarning',
660 'SpecialFunctionError',
661 'orthogonal', # Not public, but kept in __all__ for back-compat
662 'logsumexp',
663 'softmax',
664 'log_softmax',
665 'multigammaln',
666 'ellip_harm',
667 'ellip_harm_2',
668 'ellip_normal',
669 'lambertw',
670 'spherical_jn',
671 'spherical_yn',
672 'spherical_in',
673 'spherical_kn',
674]
676from scipy._lib._testutils import PytestTester
677test = PytestTester(__name__)
678del PytestTester