Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/scipy/special/__init__.py: 100%
17 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-12 06:31 +0000
1"""
2========================================
3Special functions (:mod:`scipy.special`)
4========================================
6.. currentmodule:: scipy.special
8Almost all of the functions below accept NumPy arrays as input
9arguments as well as single numbers. This means they follow
10broadcasting and automatic array-looping rules. Technically,
11they are `NumPy universal functions
12<https://numpy.org/doc/stable/user/basics.ufuncs.html#ufuncs-basics>`_.
13Functions which do not accept NumPy arrays are marked by a warning
14in the section description.
16.. seealso::
18 `scipy.special.cython_special` -- Typed Cython versions of special functions
21Error handling
22==============
24Errors are handled by returning NaNs or other appropriate values.
25Some of the special function routines can emit warnings or raise
26exceptions when an error occurs. By default this is disabled; to
27query and control the current error handling state the following
28functions are provided.
30.. autosummary::
31 :toctree: generated/
33 geterr -- Get the current way of handling special-function errors.
34 seterr -- Set how special-function errors are handled.
35 errstate -- Context manager for special-function error handling.
36 SpecialFunctionWarning -- Warning that can be emitted by special functions.
37 SpecialFunctionError -- Exception that can be raised by special functions.
39Available functions
40===================
42Airy functions
43--------------
45.. autosummary::
46 :toctree: generated/
48 airy -- Airy functions and their derivatives.
49 airye -- Exponentially scaled Airy functions and their derivatives.
50 ai_zeros -- Compute `nt` zeros and values of the Airy function Ai and its derivative.
51 bi_zeros -- Compute `nt` zeros and values of the Airy function Bi and its derivative.
52 itairy -- Integrals of Airy functions
55Elliptic functions and integrals
56--------------------------------
58.. autosummary::
59 :toctree: generated/
61 ellipj -- Jacobian elliptic functions.
62 ellipk -- Complete elliptic integral of the first kind.
63 ellipkm1 -- Complete elliptic integral of the first kind around `m` = 1.
64 ellipkinc -- Incomplete elliptic integral of the first kind.
65 ellipe -- Complete elliptic integral of the second kind.
66 ellipeinc -- Incomplete elliptic integral of the second kind.
67 elliprc -- Degenerate symmetric integral RC.
68 elliprd -- Symmetric elliptic integral of the second kind.
69 elliprf -- Completely-symmetric elliptic integral of the first kind.
70 elliprg -- Completely-symmetric elliptic integral of the second kind.
71 elliprj -- Symmetric elliptic integral of the third kind.
73Bessel functions
74----------------
76.. autosummary::
77 :toctree: generated/
79 jv -- Bessel function of the first kind of real order and \
80 complex argument.
81 jve -- Exponentially scaled Bessel function of order `v`.
82 yn -- Bessel function of the second kind of integer order and \
83 real argument.
84 yv -- Bessel function of the second kind of real order and \
85 complex argument.
86 yve -- Exponentially scaled Bessel function of the second kind \
87 of real order.
88 kn -- Modified Bessel function of the second kind of integer \
89 order `n`
90 kv -- Modified Bessel function of the second kind of real order \
91 `v`
92 kve -- Exponentially scaled modified Bessel function of the \
93 second kind.
94 iv -- Modified Bessel function of the first kind of real order.
95 ive -- Exponentially scaled modified Bessel function of the \
96 first kind.
97 hankel1 -- Hankel function of the first kind.
98 hankel1e -- Exponentially scaled Hankel function of the first kind.
99 hankel2 -- Hankel function of the second kind.
100 hankel2e -- Exponentially scaled Hankel function of the second kind.
101 wright_bessel -- Wright's generalized Bessel function.
103The following function does not accept NumPy arrays (it is not a
104universal function):
106.. autosummary::
107 :toctree: generated/
109 lmbda -- Jahnke-Emden Lambda function, Lambdav(x).
111Zeros of Bessel functions
112^^^^^^^^^^^^^^^^^^^^^^^^^
114The following functions do not accept NumPy arrays (they are not
115universal functions):
117.. autosummary::
118 :toctree: generated/
120 jnjnp_zeros -- Compute zeros of integer-order Bessel functions Jn and Jn'.
121 jnyn_zeros -- Compute nt zeros of Bessel functions Jn(x), Jn'(x), Yn(x), and Yn'(x).
122 jn_zeros -- Compute zeros of integer-order Bessel function Jn(x).
123 jnp_zeros -- Compute zeros of integer-order Bessel function derivative Jn'(x).
124 yn_zeros -- Compute zeros of integer-order Bessel function Yn(x).
125 ynp_zeros -- Compute zeros of integer-order Bessel function derivative Yn'(x).
126 y0_zeros -- Compute nt zeros of Bessel function Y0(z), and derivative at each zero.
127 y1_zeros -- Compute nt zeros of Bessel function Y1(z), and derivative at each zero.
128 y1p_zeros -- Compute nt zeros of Bessel derivative Y1'(z), and value at each zero.
130Faster versions of common Bessel functions
131^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133.. autosummary::
134 :toctree: generated/
136 j0 -- Bessel function of the first kind of order 0.
137 j1 -- Bessel function of the first kind of order 1.
138 y0 -- Bessel function of the second kind of order 0.
139 y1 -- Bessel function of the second kind of order 1.
140 i0 -- Modified Bessel function of order 0.
141 i0e -- Exponentially scaled modified Bessel function of order 0.
142 i1 -- Modified Bessel function of order 1.
143 i1e -- Exponentially scaled modified Bessel function of order 1.
144 k0 -- Modified Bessel function of the second kind of order 0, :math:`K_0`.
145 k0e -- Exponentially scaled modified Bessel function K of order 0
146 k1 -- Modified Bessel function of the second kind of order 1, :math:`K_1(x)`.
147 k1e -- Exponentially scaled modified Bessel function K of order 1.
149Integrals of Bessel functions
150^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152.. autosummary::
153 :toctree: generated/
155 itj0y0 -- Integrals of Bessel functions of order 0.
156 it2j0y0 -- Integrals related to Bessel functions of order 0.
157 iti0k0 -- Integrals of modified Bessel functions of order 0.
158 it2i0k0 -- Integrals related to modified Bessel functions of order 0.
159 besselpoly -- Weighted integral of a Bessel function.
161Derivatives of Bessel functions
162^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164.. autosummary::
165 :toctree: generated/
167 jvp -- Compute nth derivative of Bessel function Jv(z) with respect to `z`.
168 yvp -- Compute nth derivative of Bessel function Yv(z) with respect to `z`.
169 kvp -- Compute nth derivative of real-order modified Bessel function Kv(z)
170 ivp -- Compute nth derivative of modified Bessel function Iv(z) with respect to `z`.
171 h1vp -- Compute nth derivative of Hankel function H1v(z) with respect to `z`.
172 h2vp -- Compute nth derivative of Hankel function H2v(z) with respect to `z`.
174Spherical Bessel functions
175^^^^^^^^^^^^^^^^^^^^^^^^^^
177.. autosummary::
178 :toctree: generated/
180 spherical_jn -- Spherical Bessel function of the first kind or its derivative.
181 spherical_yn -- Spherical Bessel function of the second kind or its derivative.
182 spherical_in -- Modified spherical Bessel function of the first kind or its derivative.
183 spherical_kn -- Modified spherical Bessel function of the second kind or its derivative.
185Riccati-Bessel functions
186^^^^^^^^^^^^^^^^^^^^^^^^
188The following functions do not accept NumPy arrays (they are not
189universal functions):
191.. autosummary::
192 :toctree: generated/
194 riccati_jn -- Compute Ricatti-Bessel function of the first kind and its derivative.
195 riccati_yn -- Compute Ricatti-Bessel function of the second kind and its derivative.
197Struve functions
198----------------
200.. autosummary::
201 :toctree: generated/
203 struve -- Struve function.
204 modstruve -- Modified Struve function.
205 itstruve0 -- Integral of the Struve function of order 0.
206 it2struve0 -- Integral related to the Struve function of order 0.
207 itmodstruve0 -- Integral of the modified Struve function of order 0.
210Raw statistical functions
211-------------------------
213.. seealso:: :mod:`scipy.stats`: Friendly versions of these functions.
215.. autosummary::
216 :toctree: generated/
218 bdtr -- Binomial distribution cumulative distribution function.
219 bdtrc -- Binomial distribution survival function.
220 bdtri -- Inverse function to `bdtr` with respect to `p`.
221 bdtrik -- Inverse function to `bdtr` with respect to `k`.
222 bdtrin -- Inverse function to `bdtr` with respect to `n`.
223 btdtr -- Cumulative distribution function of the beta distribution.
224 btdtri -- The `p`-th quantile of the beta distribution.
225 btdtria -- Inverse of `btdtr` with respect to `a`.
226 btdtrib -- btdtria(a, p, x).
227 fdtr -- F cumulative distribution function.
228 fdtrc -- F survival function.
229 fdtri -- The `p`-th quantile of the F-distribution.
230 fdtridfd -- Inverse to `fdtr` vs dfd.
231 gdtr -- Gamma distribution cumulative distribution function.
232 gdtrc -- Gamma distribution survival function.
233 gdtria -- Inverse of `gdtr` vs a.
234 gdtrib -- Inverse of `gdtr` vs b.
235 gdtrix -- Inverse of `gdtr` vs x.
236 nbdtr -- Negative binomial cumulative distribution function.
237 nbdtrc -- Negative binomial survival function.
238 nbdtri -- Inverse of `nbdtr` vs `p`.
239 nbdtrik -- Inverse of `nbdtr` vs `k`.
240 nbdtrin -- Inverse of `nbdtr` vs `n`.
241 ncfdtr -- Cumulative distribution function of the non-central F distribution.
242 ncfdtridfd -- Calculate degrees of freedom (denominator) for the noncentral F-distribution.
243 ncfdtridfn -- Calculate degrees of freedom (numerator) for the noncentral F-distribution.
244 ncfdtri -- Inverse cumulative distribution function of the non-central F distribution.
245 ncfdtrinc -- Calculate non-centrality parameter for non-central F distribution.
246 nctdtr -- Cumulative distribution function of the non-central `t` distribution.
247 nctdtridf -- Calculate degrees of freedom for non-central t distribution.
248 nctdtrit -- Inverse cumulative distribution function of the non-central t distribution.
249 nctdtrinc -- Calculate non-centrality parameter for non-central t distribution.
250 nrdtrimn -- Calculate mean of normal distribution given other params.
251 nrdtrisd -- Calculate standard deviation of normal distribution given other params.
252 pdtr -- Poisson cumulative distribution function.
253 pdtrc -- Poisson survival function.
254 pdtri -- Inverse to `pdtr` vs m.
255 pdtrik -- Inverse to `pdtr` vs k.
256 stdtr -- Student t distribution cumulative distribution function.
257 stdtridf -- Inverse of `stdtr` vs df.
258 stdtrit -- Inverse of `stdtr` vs `t`.
259 chdtr -- Chi square cumulative distribution function.
260 chdtrc -- Chi square survival function.
261 chdtri -- Inverse to `chdtrc`.
262 chdtriv -- Inverse to `chdtr` vs `v`.
263 ndtr -- Gaussian cumulative distribution function.
264 log_ndtr -- Logarithm of Gaussian cumulative distribution function.
265 ndtri -- Inverse of `ndtr` vs x.
266 ndtri_exp -- Inverse of `log_ndtr` vs x.
267 chndtr -- Non-central chi square cumulative distribution function.
268 chndtridf -- Inverse to `chndtr` vs `df`.
269 chndtrinc -- Inverse to `chndtr` vs `nc`.
270 chndtrix -- Inverse to `chndtr` vs `x`.
271 smirnov -- Kolmogorov-Smirnov complementary cumulative distribution function.
272 smirnovi -- Inverse to `smirnov`.
273 kolmogorov -- Complementary cumulative distribution function of Kolmogorov distribution.
274 kolmogi -- Inverse function to `kolmogorov`.
275 tklmbda -- Tukey-Lambda cumulative distribution function.
276 logit -- Logit ufunc for ndarrays.
277 expit -- Logistic sigmoid function.
278 log_expit -- Logarithm of the logistic sigmoid function.
279 boxcox -- Compute the Box-Cox transformation.
280 boxcox1p -- Compute the Box-Cox transformation of 1 + `x`.
281 inv_boxcox -- Compute the inverse of the Box-Cox transformation.
282 inv_boxcox1p -- Compute the inverse of the Box-Cox transformation.
283 owens_t -- Owen's T Function.
286Information Theory functions
287----------------------------
289.. autosummary::
290 :toctree: generated/
292 entr -- Elementwise function for computing entropy.
293 rel_entr -- Elementwise function for computing relative entropy.
294 kl_div -- Elementwise function for computing Kullback-Leibler divergence.
295 huber -- Huber loss function.
296 pseudo_huber -- Pseudo-Huber loss function.
299Gamma and related functions
300---------------------------
302.. autosummary::
303 :toctree: generated/
305 gamma -- Gamma function.
306 gammaln -- Logarithm of the absolute value of the Gamma function for real inputs.
307 loggamma -- Principal branch of the logarithm of the Gamma function.
308 gammasgn -- Sign of the gamma function.
309 gammainc -- Regularized lower incomplete gamma function.
310 gammaincinv -- Inverse to `gammainc`.
311 gammaincc -- Regularized upper incomplete gamma function.
312 gammainccinv -- Inverse to `gammaincc`.
313 beta -- Beta function.
314 betaln -- Natural logarithm of absolute value of beta function.
315 betainc -- Incomplete beta integral.
316 betaincinv -- Inverse function to beta integral.
317 psi -- The digamma function.
318 rgamma -- Gamma function inverted.
319 polygamma -- Polygamma function n.
320 multigammaln -- Returns the log of multivariate gamma, also sometimes called the generalized gamma.
321 digamma -- psi(x[, out]).
322 poch -- Rising factorial (z)_m.
325Error function and Fresnel integrals
326------------------------------------
328.. autosummary::
329 :toctree: generated/
331 erf -- Returns the error function of complex argument.
332 erfc -- Complementary error function, ``1 - erf(x)``.
333 erfcx -- Scaled complementary error function, ``exp(x**2) * erfc(x)``.
334 erfi -- Imaginary error function, ``-i erf(i z)``.
335 erfinv -- Inverse function for erf.
336 erfcinv -- Inverse function for erfc.
337 wofz -- Faddeeva function.
338 dawsn -- Dawson's integral.
339 fresnel -- Fresnel sin and cos integrals.
340 fresnel_zeros -- Compute nt complex zeros of sine and cosine Fresnel integrals S(z) and C(z).
341 modfresnelp -- Modified Fresnel positive integrals.
342 modfresnelm -- Modified Fresnel negative integrals.
343 voigt_profile -- Voigt profile.
345The following functions do not accept NumPy arrays (they are not
346universal functions):
348.. autosummary::
349 :toctree: generated/
351 erf_zeros -- Compute nt complex zeros of error function erf(z).
352 fresnelc_zeros -- Compute nt complex zeros of cosine Fresnel integral C(z).
353 fresnels_zeros -- Compute nt complex zeros of sine Fresnel integral S(z).
355Legendre functions
356------------------
358.. autosummary::
359 :toctree: generated/
361 lpmv -- Associated Legendre function of integer order and real degree.
362 sph_harm -- Compute spherical harmonics.
364The following functions do not accept NumPy arrays (they are not
365universal functions):
367.. autosummary::
368 :toctree: generated/
370 clpmn -- Associated Legendre function of the first kind for complex arguments.
371 lpn -- Legendre function of the first kind.
372 lqn -- Legendre function of the second kind.
373 lpmn -- Sequence of associated Legendre functions of the first kind.
374 lqmn -- Sequence of associated Legendre functions of the second kind.
376Ellipsoidal harmonics
377---------------------
379.. autosummary::
380 :toctree: generated/
382 ellip_harm -- Ellipsoidal harmonic functions E^p_n(l).
383 ellip_harm_2 -- Ellipsoidal harmonic functions F^p_n(l).
384 ellip_normal -- Ellipsoidal harmonic normalization constants gamma^p_n.
386Orthogonal polynomials
387----------------------
389The following functions evaluate values of orthogonal polynomials:
391.. autosummary::
392 :toctree: generated/
394 assoc_laguerre -- Compute the generalized (associated) Laguerre polynomial of degree n and order k.
395 eval_legendre -- Evaluate Legendre polynomial at a point.
396 eval_chebyt -- Evaluate Chebyshev polynomial of the first kind at a point.
397 eval_chebyu -- Evaluate Chebyshev polynomial of the second kind at a point.
398 eval_chebyc -- Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a point.
399 eval_chebys -- Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a point.
400 eval_jacobi -- Evaluate Jacobi polynomial at a point.
401 eval_laguerre -- Evaluate Laguerre polynomial at a point.
402 eval_genlaguerre -- Evaluate generalized Laguerre polynomial at a point.
403 eval_hermite -- Evaluate physicist's Hermite polynomial at a point.
404 eval_hermitenorm -- Evaluate probabilist's (normalized) Hermite polynomial at a point.
405 eval_gegenbauer -- Evaluate Gegenbauer polynomial at a point.
406 eval_sh_legendre -- Evaluate shifted Legendre polynomial at a point.
407 eval_sh_chebyt -- Evaluate shifted Chebyshev polynomial of the first kind at a point.
408 eval_sh_chebyu -- Evaluate shifted Chebyshev polynomial of the second kind at a point.
409 eval_sh_jacobi -- Evaluate shifted Jacobi polynomial at a point.
411The following functions compute roots and quadrature weights for
412orthogonal polynomials:
414.. autosummary::
415 :toctree: generated/
417 roots_legendre -- Gauss-Legendre quadrature.
418 roots_chebyt -- Gauss-Chebyshev (first kind) quadrature.
419 roots_chebyu -- Gauss-Chebyshev (second kind) quadrature.
420 roots_chebyc -- Gauss-Chebyshev (first kind) quadrature.
421 roots_chebys -- Gauss-Chebyshev (second kind) quadrature.
422 roots_jacobi -- Gauss-Jacobi quadrature.
423 roots_laguerre -- Gauss-Laguerre quadrature.
424 roots_genlaguerre -- Gauss-generalized Laguerre quadrature.
425 roots_hermite -- Gauss-Hermite (physicst's) quadrature.
426 roots_hermitenorm -- Gauss-Hermite (statistician's) quadrature.
427 roots_gegenbauer -- Gauss-Gegenbauer quadrature.
428 roots_sh_legendre -- Gauss-Legendre (shifted) quadrature.
429 roots_sh_chebyt -- Gauss-Chebyshev (first kind, shifted) quadrature.
430 roots_sh_chebyu -- Gauss-Chebyshev (second kind, shifted) quadrature.
431 roots_sh_jacobi -- Gauss-Jacobi (shifted) quadrature.
433The functions below, in turn, return the polynomial coefficients in
434``orthopoly1d`` objects, which function similarly as `numpy.poly1d`.
435The ``orthopoly1d`` class also has an attribute ``weights``, which returns
436the roots, weights, and total weights for the appropriate form of Gaussian
437quadrature. These are returned in an ``n x 3`` array with roots in the first
438column, weights in the second column, and total weights in the final column.
439Note that ``orthopoly1d`` objects are converted to `~numpy.poly1d` when doing
440arithmetic, and lose information of the original orthogonal polynomial.
442.. autosummary::
443 :toctree: generated/
445 legendre -- Legendre polynomial.
446 chebyt -- Chebyshev polynomial of the first kind.
447 chebyu -- Chebyshev polynomial of the second kind.
448 chebyc -- Chebyshev polynomial of the first kind on :math:`[-2, 2]`.
449 chebys -- Chebyshev polynomial of the second kind on :math:`[-2, 2]`.
450 jacobi -- Jacobi polynomial.
451 laguerre -- Laguerre polynomial.
452 genlaguerre -- Generalized (associated) Laguerre polynomial.
453 hermite -- Physicist's Hermite polynomial.
454 hermitenorm -- Normalized (probabilist's) Hermite polynomial.
455 gegenbauer -- Gegenbauer (ultraspherical) polynomial.
456 sh_legendre -- Shifted Legendre polynomial.
457 sh_chebyt -- Shifted Chebyshev polynomial of the first kind.
458 sh_chebyu -- Shifted Chebyshev polynomial of the second kind.
459 sh_jacobi -- Shifted Jacobi polynomial.
461.. warning::
463 Computing values of high-order polynomials (around ``order > 20``) using
464 polynomial coefficients is numerically unstable. To evaluate polynomial
465 values, the ``eval_*`` functions should be used instead.
468Hypergeometric functions
469------------------------
471.. autosummary::
472 :toctree: generated/
474 hyp2f1 -- Gauss hypergeometric function 2F1(a, b; c; z).
475 hyp1f1 -- Confluent hypergeometric function 1F1(a, b; x).
476 hyperu -- Confluent hypergeometric function U(a, b, x) of the second kind.
477 hyp0f1 -- Confluent hypergeometric limit function 0F1.
480Parabolic cylinder functions
481----------------------------
483.. autosummary::
484 :toctree: generated/
486 pbdv -- Parabolic cylinder function D.
487 pbvv -- Parabolic cylinder function V.
488 pbwa -- Parabolic cylinder function W.
490The following functions do not accept NumPy arrays (they are not
491universal functions):
493.. autosummary::
494 :toctree: generated/
496 pbdv_seq -- Parabolic cylinder functions Dv(x) and derivatives.
497 pbvv_seq -- Parabolic cylinder functions Vv(x) and derivatives.
498 pbdn_seq -- Parabolic cylinder functions Dn(z) and derivatives.
500Mathieu and related functions
501-----------------------------
503.. autosummary::
504 :toctree: generated/
506 mathieu_a -- Characteristic value of even Mathieu functions.
507 mathieu_b -- Characteristic value of odd Mathieu functions.
509The following functions do not accept NumPy arrays (they are not
510universal functions):
512.. autosummary::
513 :toctree: generated/
515 mathieu_even_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
516 mathieu_odd_coef -- Fourier coefficients for even Mathieu and modified Mathieu functions.
518The following return both function and first derivative:
520.. autosummary::
521 :toctree: generated/
523 mathieu_cem -- Even Mathieu function and its derivative.
524 mathieu_sem -- Odd Mathieu function and its derivative.
525 mathieu_modcem1 -- Even modified Mathieu function of the first kind and its derivative.
526 mathieu_modcem2 -- Even modified Mathieu function of the second kind and its derivative.
527 mathieu_modsem1 -- Odd modified Mathieu function of the first kind and its derivative.
528 mathieu_modsem2 -- Odd modified Mathieu function of the second kind and its derivative.
530Spheroidal wave functions
531-------------------------
533.. autosummary::
534 :toctree: generated/
536 pro_ang1 -- Prolate spheroidal angular function of the first kind and its derivative.
537 pro_rad1 -- Prolate spheroidal radial function of the first kind and its derivative.
538 pro_rad2 -- Prolate spheroidal radial function of the secon kind and its derivative.
539 obl_ang1 -- Oblate spheroidal angular function of the first kind and its derivative.
540 obl_rad1 -- Oblate spheroidal radial function of the first kind and its derivative.
541 obl_rad2 -- Oblate spheroidal radial function of the second kind and its derivative.
542 pro_cv -- Characteristic value of prolate spheroidal function.
543 obl_cv -- Characteristic value of oblate spheroidal function.
544 pro_cv_seq -- Characteristic values for prolate spheroidal wave functions.
545 obl_cv_seq -- Characteristic values for oblate spheroidal wave functions.
547The following functions require pre-computed characteristic value:
549.. autosummary::
550 :toctree: generated/
552 pro_ang1_cv -- Prolate spheroidal angular function pro_ang1 for precomputed characteristic value.
553 pro_rad1_cv -- Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.
554 pro_rad2_cv -- Prolate spheroidal radial function pro_rad2 for precomputed characteristic value.
555 obl_ang1_cv -- Oblate spheroidal angular function obl_ang1 for precomputed characteristic value.
556 obl_rad1_cv -- Oblate spheroidal radial function obl_rad1 for precomputed characteristic value.
557 obl_rad2_cv -- Oblate spheroidal radial function obl_rad2 for precomputed characteristic value.
559Kelvin functions
560----------------
562.. autosummary::
563 :toctree: generated/
565 kelvin -- Kelvin functions as complex numbers.
566 kelvin_zeros -- Compute nt zeros of all Kelvin functions.
567 ber -- Kelvin function ber.
568 bei -- Kelvin function bei
569 berp -- Derivative of the Kelvin function `ber`.
570 beip -- Derivative of the Kelvin function `bei`.
571 ker -- Kelvin function ker.
572 kei -- Kelvin function ker.
573 kerp -- Derivative of the Kelvin function ker.
574 keip -- Derivative of the Kelvin function kei.
576The following functions do not accept NumPy arrays (they are not
577universal functions):
579.. autosummary::
580 :toctree: generated/
582 ber_zeros -- Compute nt zeros of the Kelvin function ber(x).
583 bei_zeros -- Compute nt zeros of the Kelvin function bei(x).
584 berp_zeros -- Compute nt zeros of the Kelvin function ber'(x).
585 beip_zeros -- Compute nt zeros of the Kelvin function bei'(x).
586 ker_zeros -- Compute nt zeros of the Kelvin function ker(x).
587 kei_zeros -- Compute nt zeros of the Kelvin function kei(x).
588 kerp_zeros -- Compute nt zeros of the Kelvin function ker'(x).
589 keip_zeros -- Compute nt zeros of the Kelvin function kei'(x).
591Combinatorics
592-------------
594.. autosummary::
595 :toctree: generated/
597 comb -- The number of combinations of N things taken k at a time.
598 perm -- Permutations of N things taken k at a time, i.e., k-permutations of N.
600Lambert W and related functions
601-------------------------------
603.. autosummary::
604 :toctree: generated/
606 lambertw -- Lambert W function.
607 wrightomega -- Wright Omega function.
609Other special functions
610-----------------------
612.. autosummary::
613 :toctree: generated/
615 agm -- Arithmetic, Geometric Mean.
616 bernoulli -- Bernoulli numbers B0..Bn (inclusive).
617 binom -- Binomial coefficient
618 diric -- Periodic sinc function, also called the Dirichlet function.
619 euler -- Euler numbers E0..En (inclusive).
620 expn -- Exponential integral E_n.
621 exp1 -- Exponential integral E_1 of complex argument z.
622 expi -- Exponential integral Ei.
623 factorial -- The factorial of a number or array of numbers.
624 factorial2 -- Double factorial.
625 factorialk -- Multifactorial of n of order k, n(!!...!).
626 shichi -- Hyperbolic sine and cosine integrals.
627 sici -- Sine and cosine integrals.
628 softmax -- Softmax function.
629 log_softmax -- Logarithm of softmax function.
630 spence -- Spence's function, also known as the dilogarithm.
631 zeta -- Riemann zeta function.
632 zetac -- Riemann zeta function minus 1.
634Convenience functions
635---------------------
637.. autosummary::
638 :toctree: generated/
640 cbrt -- Cube root of `x`.
641 exp10 -- 10**x.
642 exp2 -- 2**x.
643 radian -- Convert from degrees to radians.
644 cosdg -- Cosine of the angle `x` given in degrees.
645 sindg -- Sine of angle given in degrees.
646 tandg -- Tangent of angle x given in degrees.
647 cotdg -- Cotangent of the angle `x` given in degrees.
648 log1p -- Calculates log(1+x) for use when `x` is near zero.
649 expm1 -- ``exp(x) - 1`` for use when `x` is near zero.
650 cosm1 -- ``cos(x) - 1`` for use when `x` is near zero.
651 powm1 -- ``x**y - 1`` for use when `y` is near zero or `x` is near 1.
652 round -- Round to nearest integer.
653 xlogy -- Compute ``x*log(y)`` so that the result is 0 if ``x = 0``.
654 xlog1py -- Compute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.
655 logsumexp -- Compute the log of the sum of exponentials of input elements.
656 exprel -- Relative error exponential, (exp(x)-1)/x, for use when `x` is near zero.
657 sinc -- Return the sinc function.
659"""
661from ._sf_error import SpecialFunctionWarning, SpecialFunctionError
663from . import _ufuncs
664from ._ufuncs import *
666from . import _basic
667from ._basic import *
669from ._logsumexp import logsumexp, softmax, log_softmax
671from . import _orthogonal
672from ._orthogonal import *
674from ._spfun_stats import multigammaln
675from ._ellip_harm import (
676 ellip_harm,
677 ellip_harm_2,
678 ellip_normal
679)
680from ._lambertw import lambertw
681from ._spherical_bessel import (
682 spherical_jn,
683 spherical_yn,
684 spherical_in,
685 spherical_kn
686)
688# Deprecated namespaces, to be removed in v2.0.0
689from . import add_newdocs, basic, orthogonal, specfun, sf_error, spfun_stats
691__all__ = _ufuncs.__all__ + _basic.__all__ + _orthogonal.__all__ + [
692 'SpecialFunctionWarning',
693 'SpecialFunctionError',
694 'logsumexp',
695 'softmax',
696 'log_softmax',
697 'multigammaln',
698 'ellip_harm',
699 'ellip_harm_2',
700 'ellip_normal',
701 'lambertw',
702 'spherical_jn',
703 'spherical_yn',
704 'spherical_in',
705 'spherical_kn',
706]
708from scipy._lib._testutils import PytestTester
709test = PytestTester(__name__)
710del PytestTester