diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/_ellip_harm_2.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ellip_harm_2.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..6908d3f2fd304536394a40d9635e2f41ddbb92f5 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ellip_harm_2.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/_lambertw.py b/env-llmeval/lib/python3.10/site-packages/scipy/special/_lambertw.py new file mode 100644 index 0000000000000000000000000000000000000000..f758c7c21fdddc0ec1b84727d90c6de7f34a094e --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/special/_lambertw.py @@ -0,0 +1,149 @@ +from ._ufuncs import _lambertw + +import numpy as np + + +def lambertw(z, k=0, tol=1e-8): + r""" + lambertw(z, k=0, tol=1e-8) + + Lambert W function. + + The Lambert W function `W(z)` is defined as the inverse function + of ``w * exp(w)``. In other words, the value of ``W(z)`` is + such that ``z = W(z) * exp(W(z))`` for any complex number + ``z``. + + The Lambert W function is a multivalued function with infinitely + many branches. Each branch gives a separate solution of the + equation ``z = w exp(w)``. Here, the branches are indexed by the + integer `k`. + + Parameters + ---------- + z : array_like + Input argument. + k : int, optional + Branch index. + tol : float, optional + Evaluation tolerance. + + Returns + ------- + w : array + `w` will have the same shape as `z`. + + See Also + -------- + wrightomega : the Wright Omega function + + Notes + ----- + All branches are supported by `lambertw`: + + * ``lambertw(z)`` gives the principal solution (branch 0) + * ``lambertw(z, k)`` gives the solution on branch `k` + + The Lambert W function has two partially real branches: the + principal branch (`k = 0`) is real for real ``z > -1/e``, and the + ``k = -1`` branch is real for ``-1/e < z < 0``. All branches except + ``k = 0`` have a logarithmic singularity at ``z = 0``. + + **Possible issues** + + The evaluation can become inaccurate very close to the branch point + at ``-1/e``. In some corner cases, `lambertw` might currently + fail to converge, or can end up on the wrong branch. + + **Algorithm** + + Halley's iteration is used to invert ``w * exp(w)``, using a first-order + asymptotic approximation (O(log(w)) or `O(w)`) as the initial estimate. + + The definition, implementation and choice of branches is based on [2]_. + + References + ---------- + .. [1] https://en.wikipedia.org/wiki/Lambert_W_function + .. [2] Corless et al, "On the Lambert W function", Adv. Comp. Math. 5 + (1996) 329-359. + https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf + + Examples + -------- + The Lambert W function is the inverse of ``w exp(w)``: + + >>> import numpy as np + >>> from scipy.special import lambertw + >>> w = lambertw(1) + >>> w + (0.56714329040978384+0j) + >>> w * np.exp(w) + (1.0+0j) + + Any branch gives a valid inverse: + + >>> w = lambertw(1, k=3) + >>> w + (-2.8535817554090377+17.113535539412148j) + >>> w*np.exp(w) + (1.0000000000000002+1.609823385706477e-15j) + + **Applications to equation-solving** + + The Lambert W function may be used to solve various kinds of + equations. We give two examples here. + + First, the function can be used to solve implicit equations of the + form + + :math:`x = a + b e^{c x}` + + for :math:`x`. We assume :math:`c` is not zero. After a little + algebra, the equation may be written + + :math:`z e^z = -b c e^{a c}` + + where :math:`z = c (a - x)`. :math:`z` may then be expressed using + the Lambert W function + + :math:`z = W(-b c e^{a c})` + + giving + + :math:`x = a - W(-b c e^{a c})/c` + + For example, + + >>> a = 3 + >>> b = 2 + >>> c = -0.5 + + The solution to :math:`x = a + b e^{c x}` is: + + >>> x = a - lambertw(-b*c*np.exp(a*c))/c + >>> x + (3.3707498368978794+0j) + + Verify that it solves the equation: + + >>> a + b*np.exp(c*x) + (3.37074983689788+0j) + + The Lambert W function may also be used find the value of the infinite + power tower :math:`z^{z^{z^{\ldots}}}`: + + >>> def tower(z, n): + ... if n == 0: + ... return z + ... return z ** tower(z, n-1) + ... + >>> tower(0.5, 100) + 0.641185744504986 + >>> -lambertw(-np.log(0.5)) / np.log(0.5) + (0.64118574450498589+0j) + """ + # TODO: special expert should inspect this + # interception; better place to do it? + k = np.asarray(k, dtype=np.dtype("long")) + return _lambertw(z, k, tol) diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/_test_internal.pyi b/env-llmeval/lib/python3.10/site-packages/scipy/special/_test_internal.pyi new file mode 100644 index 0000000000000000000000000000000000000000..0e209e366f0b37415159083434a053545bc78fae --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/special/_test_internal.pyi @@ -0,0 +1,9 @@ +import numpy as np + +def have_fenv() -> bool: ... +def random_double(size: int) -> np.float64: ... +def test_add_round(size: int, mode: str): ... + +def _dd_exp(xhi: float, xlo: float) -> tuple[float, float]: ... +def _dd_log(xhi: float, xlo: float) -> tuple[float, float]: ... +def _dd_expm1(xhi: float, xlo: float) -> tuple[float, float]: ... diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_cxx.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_cxx.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..40dfb76c4d3b4ef7b4ea3eb1d8c4dd727d014e2a Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_cxx.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_defs.h b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_defs.h new file mode 100644 index 0000000000000000000000000000000000000000..bf634d76844b6f28b2ba8bd4696f933b139e444b --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/special/_ufuncs_defs.h @@ -0,0 +1,185 @@ +#ifndef UFUNCS_PROTO_H +#define UFUNCS_PROTO_H 1 +#include "_cosine.h" +npy_double cosine_cdf(npy_double); +npy_double cosine_invcdf(npy_double); +#include "cephes.h" +npy_double cospi(npy_double); +npy_double igam_fac(npy_double, npy_double); +npy_double kolmogc(npy_double); +npy_double kolmogci(npy_double); +npy_double kolmogp(npy_double); +npy_double lanczos_sum_expg_scaled(npy_double); +npy_double lgam1p(npy_double); +npy_double log1pmx(npy_double); +npy_double riemann_zeta(npy_double); +#include "scaled_exp1.h" +npy_double scaled_exp1(npy_double); +npy_double sinpi(npy_double); +npy_double smirnovc(npy_int, npy_double); +npy_double smirnovci(npy_int, npy_double); +npy_double smirnovp(npy_int, npy_double); +npy_double struve_asymp_large_z(npy_double, npy_double, npy_int, npy_double *); +npy_double struve_bessel_series(npy_double, npy_double, npy_int, npy_double *); +npy_double struve_power_series(npy_double, npy_double, npy_int, npy_double *); +npy_double zeta(npy_double, npy_double); +#include "amos_wrappers.h" +npy_int airy_wrap(npy_double, npy_double *, npy_double *, npy_double *, npy_double *); +npy_int cairy_wrap(npy_cdouble, npy_cdouble *, npy_cdouble *, npy_cdouble *, npy_cdouble *); +npy_int cairy_wrap_e(npy_cdouble, npy_cdouble *, npy_cdouble *, npy_cdouble *, npy_cdouble *); +npy_int cairy_wrap_e_real(npy_double, npy_double *, npy_double *, npy_double *, npy_double *); +npy_double bdtr(npy_double, npy_int, npy_double); +npy_double bdtrc(npy_double, npy_int, npy_double); +npy_double bdtri(npy_double, npy_int, npy_double); +#include "specfun_wrappers.h" +npy_double bei_wrap(npy_double); +npy_double beip_wrap(npy_double); +npy_double ber_wrap(npy_double); +npy_double berp_wrap(npy_double); +npy_double besselpoly(npy_double, npy_double, npy_double); +npy_double beta(npy_double, npy_double); +npy_double lbeta(npy_double, npy_double); +npy_double btdtr(npy_double, npy_double, npy_double); +npy_double incbi(npy_double, npy_double, npy_double); +npy_double cbrt(npy_double); +npy_double chdtr(npy_double, npy_double); +npy_double chdtrc(npy_double, npy_double); +npy_double chdtri(npy_double, npy_double); +npy_double cosdg(npy_double); +npy_double cosm1(npy_double); +npy_double cotdg(npy_double); +npy_double ellpe(npy_double); +npy_double ellie(npy_double, npy_double); +npy_int ellpj(npy_double, npy_double, npy_double *, npy_double *, npy_double *, npy_double *); +npy_double ellik(npy_double, npy_double); +npy_double ellpk(npy_double); +npy_double erf(npy_double); +npy_double erfc(npy_double); +npy_double erfcinv(npy_double); +npy_cdouble cexp1_wrap(npy_cdouble); +npy_double exp1_wrap(npy_double); +npy_double exp10(npy_double); +npy_double exp2(npy_double); +npy_cdouble cexpi_wrap(npy_cdouble); +npy_double expi_wrap(npy_double); +npy_double expm1(npy_double); +npy_double expn(npy_int, npy_double); +npy_double fdtr(npy_double, npy_double, npy_double); +npy_double fdtrc(npy_double, npy_double, npy_double); +npy_double fdtri(npy_double, npy_double, npy_double); +npy_int fresnl(npy_double, npy_double *, npy_double *); +npy_int cfresnl_wrap(npy_cdouble, npy_cdouble *, npy_cdouble *); +npy_double Gamma(npy_double); +npy_double igam(npy_double, npy_double); +npy_double igamc(npy_double, npy_double); +npy_double igamci(npy_double, npy_double); +npy_double igami(npy_double, npy_double); +npy_double lgam(npy_double); +npy_double gammasgn(npy_double); +npy_double gdtr(npy_double, npy_double, npy_double); +npy_double gdtrc(npy_double, npy_double, npy_double); +npy_cdouble cbesh_wrap1(npy_double, npy_cdouble); +npy_cdouble cbesh_wrap1_e(npy_double, npy_cdouble); +npy_cdouble cbesh_wrap2(npy_double, npy_cdouble); +npy_cdouble cbesh_wrap2_e(npy_double, npy_cdouble); +npy_cdouble chyp1f1_wrap(npy_double, npy_double, npy_cdouble); +npy_double hyp2f1(npy_double, npy_double, npy_double, npy_double); +npy_double i0(npy_double); +npy_double i0e(npy_double); +npy_double i1(npy_double); +npy_double i1e(npy_double); +npy_int it2i0k0_wrap(npy_double, npy_double *, npy_double *); +npy_int it2j0y0_wrap(npy_double, npy_double *, npy_double *); +npy_double it2struve0_wrap(npy_double); +npy_int itairy_wrap(npy_double, npy_double *, npy_double *, npy_double *, npy_double *); +npy_int it1i0k0_wrap(npy_double, npy_double *, npy_double *); +npy_int it1j0y0_wrap(npy_double, npy_double *, npy_double *); +npy_double itmodstruve0_wrap(npy_double); +npy_double itstruve0_wrap(npy_double); +npy_cdouble cbesi_wrap(npy_double, npy_cdouble); +npy_double iv(npy_double, npy_double); +npy_cdouble cbesi_wrap_e(npy_double, npy_cdouble); +npy_double cbesi_wrap_e_real(npy_double, npy_double); +npy_double j0(npy_double); +npy_double j1(npy_double); +npy_cdouble cbesj_wrap(npy_double, npy_cdouble); +npy_double cbesj_wrap_real(npy_double, npy_double); +npy_cdouble cbesj_wrap_e(npy_double, npy_cdouble); +npy_double cbesj_wrap_e_real(npy_double, npy_double); +npy_double k0(npy_double); +npy_double k0e(npy_double); +npy_double k1(npy_double); +npy_double k1e(npy_double); +npy_double kei_wrap(npy_double); +npy_double keip_wrap(npy_double); +npy_int kelvin_wrap(npy_double, npy_cdouble *, npy_cdouble *, npy_cdouble *, npy_cdouble *); +npy_double ker_wrap(npy_double); +npy_double kerp_wrap(npy_double); +npy_double cbesk_wrap_real_int(npy_int, npy_double); +npy_double kolmogi(npy_double); +npy_double kolmogorov(npy_double); +npy_cdouble cbesk_wrap(npy_double, npy_cdouble); +npy_double cbesk_wrap_real(npy_double, npy_double); +npy_cdouble cbesk_wrap_e(npy_double, npy_cdouble); +npy_double cbesk_wrap_e_real(npy_double, npy_double); +npy_double log1p(npy_double); +npy_double pmv_wrap(npy_double, npy_double, npy_double); +npy_double cem_cva_wrap(npy_double, npy_double); +npy_double sem_cva_wrap(npy_double, npy_double); +npy_int cem_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int mcm1_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int mcm2_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int msm1_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int msm2_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int sem_wrap(npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_int modified_fresnel_minus_wrap(npy_double, npy_cdouble *, npy_cdouble *); +npy_int modified_fresnel_plus_wrap(npy_double, npy_cdouble *, npy_cdouble *); +npy_double struve_l(npy_double, npy_double); +npy_double nbdtr(npy_int, npy_int, npy_double); +npy_double nbdtrc(npy_int, npy_int, npy_double); +npy_double nbdtri(npy_int, npy_int, npy_double); +npy_double ndtr(npy_double); +npy_double ndtri(npy_double); +npy_double oblate_aswfa_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int oblate_aswfa_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double oblate_segv_wrap(npy_double, npy_double, npy_double); +npy_double oblate_radial1_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int oblate_radial1_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double oblate_radial2_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int oblate_radial2_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double owens_t(npy_double, npy_double); +npy_int pbdv_wrap(npy_double, npy_double, npy_double *, npy_double *); +npy_int pbvv_wrap(npy_double, npy_double, npy_double *, npy_double *); +npy_int pbwa_wrap(npy_double, npy_double, npy_double *, npy_double *); +npy_double pdtr(npy_double, npy_double); +npy_double pdtrc(npy_double, npy_double); +npy_double pdtri(npy_int, npy_double); +npy_double poch(npy_double, npy_double); +npy_double prolate_aswfa_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int prolate_aswfa_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double prolate_segv_wrap(npy_double, npy_double, npy_double); +npy_double prolate_radial1_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int prolate_radial1_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double prolate_radial2_nocv_wrap(npy_double, npy_double, npy_double, npy_double, npy_double *); +npy_int prolate_radial2_wrap(npy_double, npy_double, npy_double, npy_double, npy_double, npy_double *, npy_double *); +npy_double radian(npy_double, npy_double, npy_double); +npy_double rgamma(npy_double); +npy_double round(npy_double); +npy_int shichi(npy_double, npy_double *, npy_double *); +npy_int sici(npy_double, npy_double *, npy_double *); +npy_double sindg(npy_double); +npy_double smirnov(npy_int, npy_double); +npy_double smirnovi(npy_int, npy_double); +npy_double spence(npy_double); +npy_double struve_h(npy_double, npy_double); +npy_double tandg(npy_double); +npy_double tukeylambdacdf(npy_double, npy_double); +npy_double y0(npy_double); +npy_double y1(npy_double); +npy_double yn(npy_int, npy_double); +npy_cdouble cbesy_wrap(npy_double, npy_cdouble); +npy_double cbesy_wrap_real(npy_double, npy_double); +npy_cdouble cbesy_wrap_e(npy_double, npy_cdouble); +npy_double cbesy_wrap_e_real(npy_double, npy_double); +npy_double zetac(npy_double); +#endif diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/cython_special.pxd b/env-llmeval/lib/python3.10/site-packages/scipy/special/cython_special.pxd new file mode 100644 index 0000000000000000000000000000000000000000..70d34600058c732c2fb702fd7d342bf997f600d8 --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/special/cython_special.pxd @@ -0,0 +1,261 @@ +# This file is automatically generated by _generate_pyx.py. +# Do not edit manually! + +ctypedef fused number_t: + double complex + double + +cpdef number_t spherical_jn(long n, number_t z, bint derivative=*) noexcept nogil +cpdef number_t spherical_yn(long n, number_t z, bint derivative=*) noexcept nogil +cpdef number_t spherical_in(long n, number_t z, bint derivative=*) noexcept nogil +cpdef number_t spherical_kn(long n, number_t z, bint derivative=*) noexcept nogil + +ctypedef fused Dd_number_t: + double complex + double + +ctypedef fused df_number_t: + double + float + +ctypedef fused dfg_number_t: + double + float + long double + +ctypedef fused dl_number_t: + double + long + +cpdef double voigt_profile(double x0, double x1, double x2) noexcept nogil +cpdef double agm(double x0, double x1) noexcept nogil +cdef void airy(Dd_number_t x0, Dd_number_t *y0, Dd_number_t *y1, Dd_number_t *y2, Dd_number_t *y3) noexcept nogil +cdef void airye(Dd_number_t x0, Dd_number_t *y0, Dd_number_t *y1, Dd_number_t *y2, Dd_number_t *y3) noexcept nogil +cpdef double bdtr(double x0, dl_number_t x1, double x2) noexcept nogil +cpdef double bdtrc(double x0, dl_number_t x1, double x2) noexcept nogil +cpdef double bdtri(double x0, dl_number_t x1, double x2) noexcept nogil +cpdef double bdtrik(double x0, double x1, double x2) noexcept nogil +cpdef double bdtrin(double x0, double x1, double x2) noexcept nogil +cpdef double bei(double x0) noexcept nogil +cpdef double beip(double x0) noexcept nogil +cpdef double ber(double x0) noexcept nogil +cpdef double berp(double x0) noexcept nogil +cpdef double besselpoly(double x0, double x1, double x2) noexcept nogil +cpdef double beta(double x0, double x1) noexcept nogil +cpdef df_number_t betainc(df_number_t x0, df_number_t x1, df_number_t x2) noexcept nogil +cpdef df_number_t betaincc(df_number_t x0, df_number_t x1, df_number_t x2) noexcept nogil +cpdef df_number_t betaincinv(df_number_t x0, df_number_t x1, df_number_t x2) noexcept nogil +cpdef df_number_t betainccinv(df_number_t x0, df_number_t x1, df_number_t x2) noexcept nogil +cpdef double betaln(double x0, double x1) noexcept nogil +cpdef double binom(double x0, double x1) noexcept nogil +cpdef double boxcox(double x0, double x1) noexcept nogil +cpdef double boxcox1p(double x0, double x1) noexcept nogil +cpdef double btdtr(double x0, double x1, double x2) noexcept nogil +cpdef double btdtri(double x0, double x1, double x2) noexcept nogil +cpdef double btdtria(double x0, double x1, double x2) noexcept nogil +cpdef double btdtrib(double x0, double x1, double x2) noexcept nogil +cpdef double cbrt(double x0) noexcept nogil +cpdef double chdtr(double x0, double x1) noexcept nogil +cpdef double chdtrc(double x0, double x1) noexcept nogil +cpdef double chdtri(double x0, double x1) noexcept nogil +cpdef double chdtriv(double x0, double x1) noexcept nogil +cpdef double chndtr(double x0, double x1, double x2) noexcept nogil +cpdef double chndtridf(double x0, double x1, double x2) noexcept nogil +cpdef double chndtrinc(double x0, double x1, double x2) noexcept nogil +cpdef double chndtrix(double x0, double x1, double x2) noexcept nogil +cpdef double cosdg(double x0) noexcept nogil +cpdef double cosm1(double x0) noexcept nogil +cpdef double cotdg(double x0) noexcept nogil +cpdef Dd_number_t dawsn(Dd_number_t x0) noexcept nogil +cpdef double ellipe(double x0) noexcept nogil +cpdef double ellipeinc(double x0, double x1) noexcept nogil +cdef void ellipj(double x0, double x1, double *y0, double *y1, double *y2, double *y3) noexcept nogil +cpdef double ellipkinc(double x0, double x1) noexcept nogil +cpdef double ellipkm1(double x0) noexcept nogil +cpdef double ellipk(double x0) noexcept nogil +cpdef Dd_number_t elliprc(Dd_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t elliprd(Dd_number_t x0, Dd_number_t x1, Dd_number_t x2) noexcept nogil +cpdef Dd_number_t elliprf(Dd_number_t x0, Dd_number_t x1, Dd_number_t x2) noexcept nogil +cpdef Dd_number_t elliprg(Dd_number_t x0, Dd_number_t x1, Dd_number_t x2) noexcept nogil +cpdef Dd_number_t elliprj(Dd_number_t x0, Dd_number_t x1, Dd_number_t x2, Dd_number_t x3) noexcept nogil +cpdef double entr(double x0) noexcept nogil +cpdef Dd_number_t erf(Dd_number_t x0) noexcept nogil +cpdef Dd_number_t erfc(Dd_number_t x0) noexcept nogil +cpdef Dd_number_t erfcx(Dd_number_t x0) noexcept nogil +cpdef Dd_number_t erfi(Dd_number_t x0) noexcept nogil +cpdef df_number_t erfinv(df_number_t x0) noexcept nogil +cpdef double erfcinv(double x0) noexcept nogil +cpdef Dd_number_t eval_chebyc(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_chebys(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_chebyt(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_chebyu(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_gegenbauer(dl_number_t x0, double x1, Dd_number_t x2) noexcept nogil +cpdef Dd_number_t eval_genlaguerre(dl_number_t x0, double x1, Dd_number_t x2) noexcept nogil +cpdef double eval_hermite(long x0, double x1) noexcept nogil +cpdef double eval_hermitenorm(long x0, double x1) noexcept nogil +cpdef Dd_number_t eval_jacobi(dl_number_t x0, double x1, double x2, Dd_number_t x3) noexcept nogil +cpdef Dd_number_t eval_laguerre(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_legendre(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_sh_chebyt(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_sh_chebyu(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t eval_sh_jacobi(dl_number_t x0, double x1, double x2, Dd_number_t x3) noexcept nogil +cpdef Dd_number_t eval_sh_legendre(dl_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t exp1(Dd_number_t x0) noexcept nogil +cpdef double exp10(double x0) noexcept nogil +cpdef double exp2(double x0) noexcept nogil +cpdef Dd_number_t expi(Dd_number_t x0) noexcept nogil +cpdef dfg_number_t expit(dfg_number_t x0) noexcept nogil +cpdef Dd_number_t expm1(Dd_number_t x0) noexcept nogil +cpdef double expn(dl_number_t x0, double x1) noexcept nogil +cpdef double exprel(double x0) noexcept nogil +cpdef double fdtr(double x0, double x1, double x2) noexcept nogil +cpdef double fdtrc(double x0, double x1, double x2) noexcept nogil +cpdef double fdtri(double x0, double x1, double x2) noexcept nogil +cpdef double fdtridfd(double x0, double x1, double x2) noexcept nogil +cdef void fresnel(Dd_number_t x0, Dd_number_t *y0, Dd_number_t *y1) noexcept nogil +cpdef Dd_number_t gamma(Dd_number_t x0) noexcept nogil +cpdef double gammainc(double x0, double x1) noexcept nogil +cpdef double gammaincc(double x0, double x1) noexcept nogil +cpdef double gammainccinv(double x0, double x1) noexcept nogil +cpdef double gammaincinv(double x0, double x1) noexcept nogil +cpdef double gammaln(double x0) noexcept nogil +cpdef double gammasgn(double x0) noexcept nogil +cpdef double gdtr(double x0, double x1, double x2) noexcept nogil +cpdef double gdtrc(double x0, double x1, double x2) noexcept nogil +cpdef double gdtria(double x0, double x1, double x2) noexcept nogil +cpdef double gdtrib(double x0, double x1, double x2) noexcept nogil +cpdef double gdtrix(double x0, double x1, double x2) noexcept nogil +cpdef double complex hankel1(double x0, double complex x1) noexcept nogil +cpdef double complex hankel1e(double x0, double complex x1) noexcept nogil +cpdef double complex hankel2(double x0, double complex x1) noexcept nogil +cpdef double complex hankel2e(double x0, double complex x1) noexcept nogil +cpdef double huber(double x0, double x1) noexcept nogil +cpdef Dd_number_t hyp0f1(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t hyp1f1(double x0, double x1, Dd_number_t x2) noexcept nogil +cpdef Dd_number_t hyp2f1(double x0, double x1, double x2, Dd_number_t x3) noexcept nogil +cpdef double hyperu(double x0, double x1, double x2) noexcept nogil +cpdef double i0(double x0) noexcept nogil +cpdef double i0e(double x0) noexcept nogil +cpdef double i1(double x0) noexcept nogil +cpdef double i1e(double x0) noexcept nogil +cpdef double inv_boxcox(double x0, double x1) noexcept nogil +cpdef double inv_boxcox1p(double x0, double x1) noexcept nogil +cdef void it2i0k0(double x0, double *y0, double *y1) noexcept nogil +cdef void it2j0y0(double x0, double *y0, double *y1) noexcept nogil +cpdef double it2struve0(double x0) noexcept nogil +cdef void itairy(double x0, double *y0, double *y1, double *y2, double *y3) noexcept nogil +cdef void iti0k0(double x0, double *y0, double *y1) noexcept nogil +cdef void itj0y0(double x0, double *y0, double *y1) noexcept nogil +cpdef double itmodstruve0(double x0) noexcept nogil +cpdef double itstruve0(double x0) noexcept nogil +cpdef Dd_number_t iv(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t ive(double x0, Dd_number_t x1) noexcept nogil +cpdef double j0(double x0) noexcept nogil +cpdef double j1(double x0) noexcept nogil +cpdef Dd_number_t jv(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t jve(double x0, Dd_number_t x1) noexcept nogil +cpdef double k0(double x0) noexcept nogil +cpdef double k0e(double x0) noexcept nogil +cpdef double k1(double x0) noexcept nogil +cpdef double k1e(double x0) noexcept nogil +cpdef double kei(double x0) noexcept nogil +cpdef double keip(double x0) noexcept nogil +cdef void kelvin(double x0, double complex *y0, double complex *y1, double complex *y2, double complex *y3) noexcept nogil +cpdef double ker(double x0) noexcept nogil +cpdef double kerp(double x0) noexcept nogil +cpdef double kl_div(double x0, double x1) noexcept nogil +cpdef double kn(dl_number_t x0, double x1) noexcept nogil +cpdef double kolmogi(double x0) noexcept nogil +cpdef double kolmogorov(double x0) noexcept nogil +cpdef Dd_number_t kv(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t kve(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t log1p(Dd_number_t x0) noexcept nogil +cpdef dfg_number_t log_expit(dfg_number_t x0) noexcept nogil +cpdef Dd_number_t log_ndtr(Dd_number_t x0) noexcept nogil +cpdef Dd_number_t loggamma(Dd_number_t x0) noexcept nogil +cpdef dfg_number_t logit(dfg_number_t x0) noexcept nogil +cpdef double lpmv(double x0, double x1, double x2) noexcept nogil +cpdef double mathieu_a(double x0, double x1) noexcept nogil +cpdef double mathieu_b(double x0, double x1) noexcept nogil +cdef void mathieu_cem(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void mathieu_modcem1(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void mathieu_modcem2(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void mathieu_modsem1(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void mathieu_modsem2(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void mathieu_sem(double x0, double x1, double x2, double *y0, double *y1) noexcept nogil +cdef void modfresnelm(double x0, double complex *y0, double complex *y1) noexcept nogil +cdef void modfresnelp(double x0, double complex *y0, double complex *y1) noexcept nogil +cpdef double modstruve(double x0, double x1) noexcept nogil +cpdef double nbdtr(dl_number_t x0, dl_number_t x1, double x2) noexcept nogil +cpdef double nbdtrc(dl_number_t x0, dl_number_t x1, double x2) noexcept nogil +cpdef double nbdtri(dl_number_t x0, dl_number_t x1, double x2) noexcept nogil +cpdef double nbdtrik(double x0, double x1, double x2) noexcept nogil +cpdef double nbdtrin(double x0, double x1, double x2) noexcept nogil +cpdef double ncfdtr(double x0, double x1, double x2, double x3) noexcept nogil +cpdef double ncfdtri(double x0, double x1, double x2, double x3) noexcept nogil +cpdef double ncfdtridfd(double x0, double x1, double x2, double x3) noexcept nogil +cpdef double ncfdtridfn(double x0, double x1, double x2, double x3) noexcept nogil +cpdef double ncfdtrinc(double x0, double x1, double x2, double x3) noexcept nogil +cpdef double nctdtr(double x0, double x1, double x2) noexcept nogil +cpdef double nctdtridf(double x0, double x1, double x2) noexcept nogil +cpdef double nctdtrinc(double x0, double x1, double x2) noexcept nogil +cpdef double nctdtrit(double x0, double x1, double x2) noexcept nogil +cpdef Dd_number_t ndtr(Dd_number_t x0) noexcept nogil +cpdef double ndtri(double x0) noexcept nogil +cpdef double nrdtrimn(double x0, double x1, double x2) noexcept nogil +cpdef double nrdtrisd(double x0, double x1, double x2) noexcept nogil +cdef void obl_ang1(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void obl_ang1_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cpdef double obl_cv(double x0, double x1, double x2) noexcept nogil +cdef void obl_rad1(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void obl_rad1_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cdef void obl_rad2(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void obl_rad2_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cpdef double owens_t(double x0, double x1) noexcept nogil +cdef void pbdv(double x0, double x1, double *y0, double *y1) noexcept nogil +cdef void pbvv(double x0, double x1, double *y0, double *y1) noexcept nogil +cdef void pbwa(double x0, double x1, double *y0, double *y1) noexcept nogil +cpdef double pdtr(double x0, double x1) noexcept nogil +cpdef double pdtrc(double x0, double x1) noexcept nogil +cpdef double pdtri(dl_number_t x0, double x1) noexcept nogil +cpdef double pdtrik(double x0, double x1) noexcept nogil +cpdef double poch(double x0, double x1) noexcept nogil +cpdef df_number_t powm1(df_number_t x0, df_number_t x1) noexcept nogil +cdef void pro_ang1(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void pro_ang1_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cpdef double pro_cv(double x0, double x1, double x2) noexcept nogil +cdef void pro_rad1(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void pro_rad1_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cdef void pro_rad2(double x0, double x1, double x2, double x3, double *y0, double *y1) noexcept nogil +cdef void pro_rad2_cv(double x0, double x1, double x2, double x3, double x4, double *y0, double *y1) noexcept nogil +cpdef double pseudo_huber(double x0, double x1) noexcept nogil +cpdef Dd_number_t psi(Dd_number_t x0) noexcept nogil +cpdef double radian(double x0, double x1, double x2) noexcept nogil +cpdef double rel_entr(double x0, double x1) noexcept nogil +cpdef Dd_number_t rgamma(Dd_number_t x0) noexcept nogil +cpdef double round(double x0) noexcept nogil +cdef void shichi(Dd_number_t x0, Dd_number_t *y0, Dd_number_t *y1) noexcept nogil +cdef void sici(Dd_number_t x0, Dd_number_t *y0, Dd_number_t *y1) noexcept nogil +cpdef double sindg(double x0) noexcept nogil +cpdef double smirnov(dl_number_t x0, double x1) noexcept nogil +cpdef double smirnovi(dl_number_t x0, double x1) noexcept nogil +cpdef Dd_number_t spence(Dd_number_t x0) noexcept nogil +cpdef double complex sph_harm(dl_number_t x0, dl_number_t x1, double x2, double x3) noexcept nogil +cpdef double stdtr(double x0, double x1) noexcept nogil +cpdef double stdtridf(double x0, double x1) noexcept nogil +cpdef double stdtrit(double x0, double x1) noexcept nogil +cpdef double struve(double x0, double x1) noexcept nogil +cpdef double tandg(double x0) noexcept nogil +cpdef double tklmbda(double x0, double x1) noexcept nogil +cpdef double complex wofz(double complex x0) noexcept nogil +cpdef Dd_number_t wrightomega(Dd_number_t x0) noexcept nogil +cpdef Dd_number_t xlog1py(Dd_number_t x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t xlogy(Dd_number_t x0, Dd_number_t x1) noexcept nogil +cpdef double y0(double x0) noexcept nogil +cpdef double y1(double x0) noexcept nogil +cpdef double yn(dl_number_t x0, double x1) noexcept nogil +cpdef Dd_number_t yv(double x0, Dd_number_t x1) noexcept nogil +cpdef Dd_number_t yve(double x0, Dd_number_t x1) noexcept nogil +cpdef double zetac(double x0) noexcept nogil +cpdef double wright_bessel(double x0, double x1, double x2) noexcept nogil +cpdef double ndtri_exp(double x0) noexcept nogil \ No newline at end of file diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/special/orthogonal.py b/env-llmeval/lib/python3.10/site-packages/scipy/special/orthogonal.py new file mode 100644 index 0000000000000000000000000000000000000000..f9e39d75d4e21ea1f8e529715cdba427f8205389 --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/special/orthogonal.py @@ -0,0 +1,47 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.special` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +_polyfuns = ['legendre', 'chebyt', 'chebyu', 'chebyc', 'chebys', + 'jacobi', 'laguerre', 'genlaguerre', 'hermite', + 'hermitenorm', 'gegenbauer', 'sh_legendre', 'sh_chebyt', + 'sh_chebyu', 'sh_jacobi'] + +# Correspondence between new and old names of root functions +_rootfuns_map = {'roots_legendre': 'p_roots', + 'roots_chebyt': 't_roots', + 'roots_chebyu': 'u_roots', + 'roots_chebyc': 'c_roots', + 'roots_chebys': 's_roots', + 'roots_jacobi': 'j_roots', + 'roots_laguerre': 'l_roots', + 'roots_genlaguerre': 'la_roots', + 'roots_hermite': 'h_roots', + 'roots_hermitenorm': 'he_roots', + 'roots_gegenbauer': 'cg_roots', + 'roots_sh_legendre': 'ps_roots', + 'roots_sh_chebyt': 'ts_roots', + 'roots_sh_chebyu': 'us_roots', + 'roots_sh_jacobi': 'js_roots'} + + +__all__ = _polyfuns + list(_rootfuns_map.keys()) + [ # noqa: F822 + 'exp', 'inf', 'floor', 'around', 'hstack', 'arange', + 'linalg', 'airy', 'orthopoly1d', 'newfun', + 'oldfun', 'p_roots', 't_roots', 'u_roots', 'c_roots', 's_roots', + 'j_roots', 'l_roots', 'la_roots', 'h_roots', 'he_roots', 'cg_roots', + 'ps_roots', 'ts_roots', 'us_roots', 'js_roots' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="special", module="orthogonal", + private_modules=["_orthogonal"], all=__all__, + attribute=name) diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/__init__.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..151e69a53825cf4380518509335d251d33345956 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/__init__.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_axis_nan_policy.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_axis_nan_policy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2599f193b43653f716f98810a73b342193893f68 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_axis_nan_policy.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binned_statistic.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binned_statistic.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7350baa77fdc9c111ec20aca209dcd20cd1346b Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binned_statistic.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binomtest.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binomtest.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fb8da69d332d463b11ac6ae27504d69c398792c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_binomtest.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_bws_test.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_bws_test.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7951ef5f8b1e4eef97d1e7dbc61dff39ebe83bd3 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_bws_test.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_censored_data.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_censored_data.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..65aaa4d9b05937bed6ac22715775cf0459cd7814 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_censored_data.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_common.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_common.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31057a8fe8994a9ecba2cfc06687c4c01cd3e072 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_common.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_constants.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_constants.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5512e491a9e5860f287b1d427b79b249faae0bce Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_constants.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_continuous_distns.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_continuous_distns.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e8e027f08c2fa4f50aec1a1ca04b626d68944913 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_continuous_distns.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_covariance.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_covariance.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ac4f6e2a4e3b21a01d82450bef7c85c04e96273 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_covariance.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_crosstab.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_crosstab.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..adc406b73aa7ad9cb1d307d15536c71d76183e95 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_crosstab.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_discrete_distns.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_discrete_distns.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f715fc7e35d76c478efd7f9ffb7f25c00a51dcec Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_discrete_distns.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distn_infrastructure.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distn_infrastructure.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..084bffd0d07bb7cfa7d12b1ade9bdc52125afeb0 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distn_infrastructure.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distr_params.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distr_params.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f24b44de559f61960697a6ce2aea0f76086fbca Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_distr_params.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_entropy.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_entropy.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2e38f227da8e14a6ea077e28ec822dbb1073e12 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_entropy.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_fit.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_fit.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8314dc2c6dd7abca95599bc29255dc6e6095005c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_fit.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_generate_pyx.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_generate_pyx.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dccdb402db7fbd7ab317e87bf9be8a0421abf362 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_generate_pyx.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_hypotests.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_hypotests.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df79a052415f02cb0d72f56b7841f042bfb8fb8c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_hypotests.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_kde.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_kde.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6aea572200e8bc156bf13a8ffea4b94e7ef41d71 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_kde.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_ksstats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_ksstats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fa7109283e33a1bc1aa01a48c533101e0d5f376 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_ksstats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mannwhitneyu.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mannwhitneyu.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd0a9e2fb3873228581167623da87f7318648319 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mannwhitneyu.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_morestats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_morestats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a73fea4a0a132135d8466a33ab1e5062514a7c09 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_morestats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_basic.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_basic.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76fd2c6129cdc568a95de73b3b382d733e0e90bf Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_basic.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_extras.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_extras.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6c94da571b5d0d98206f2f421c5c2c23d425894 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_mstats_extras.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multicomp.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multicomp.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9a8f5ea67a9e35f9f8967339ded2ba6672b36e0 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multicomp.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multivariate.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multivariate.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..866c0ffe17e668f9887020069ee050d4a8bd746c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_multivariate.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_odds_ratio.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_odds_ratio.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f98a53cdc02cce73dbb34a3182bcb4e23f64491a Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_odds_ratio.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_page_trend_test.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_page_trend_test.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8abb2301d96f365502261f51c556b76549ecafe Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_page_trend_test.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmc.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cee0c6c617e471884c4316b35a56d263fd3015e3 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmc.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmvnt.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmvnt.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68a240819cbb7de1726bcee7deb50435231dac2a Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_qmvnt.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_relative_risk.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_relative_risk.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c6bac9e485d253ab5a0c39686d5addaefbcca74 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_relative_risk.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_resampling.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_resampling.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..01e51dc634e326ef7879924f3d7fd72c8016601c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_resampling.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_result_classes.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_result_classes.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb4adb7da117dbb232afbb1102dc411c909cf5e4 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_result_classes.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_rvs_sampling.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_rvs_sampling.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da5a442963ac59bd0db36c2f98a40116562572be Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_rvs_sampling.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sampling.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sampling.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56978723107b97443df926f19e86a2ffe63aad8d Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sampling.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sensitivity_analysis.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sensitivity_analysis.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1767ee72e743eff8fe8c88e34668ea9d2646f91 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_sensitivity_analysis.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_mstats_common.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_mstats_common.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2eccdc0ed00560620e4a1d03e4ef93523cd74530 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_mstats_common.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_py.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_py.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7200792e2676a8488ce7801ad8316e038bb5a188 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_stats_py.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_survival.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_survival.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e6da9d59c9ecf483d64116c1848ffd2ac307544 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_survival.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_tukeylambda_stats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_tukeylambda_stats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa49ad1fb9a0ec6fff96a604d69a37071bf46141 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_tukeylambda_stats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_variation.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_variation.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51d9c13dcddf1879d5bfef848e5a949e42aa5d61 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_variation.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_warnings_errors.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_warnings_errors.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f53de45549f81ec14668403efa1df12e86041251 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_warnings_errors.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_wilcoxon.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_wilcoxon.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e2f056a80f4de6ef56c821ab87e54a137ef249a8 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/_wilcoxon.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/biasedurn.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/biasedurn.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4273da0960dd32d663dd61ef5d375df49793c404 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/biasedurn.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/contingency.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/contingency.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8edd8ec57482176767b8b65bbfecbc4b6a72047e Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/contingency.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/distributions.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/distributions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bdcbbdca4d1b3c7a24cfe09c2da0e1c864b52e5f Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/distributions.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/kde.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/kde.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62f0a8a073836a2fded5a68f376f009cf43cb594 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/kde.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/morestats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/morestats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..082d8208d57331c5ee70eba43a659c283f8755a3 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/morestats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8f8d1cd94de35222324d002bad3f8d5af95c4b48 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_basic.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_basic.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..444aafc31a013c10c55122930b6649705d1804e7 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_basic.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_extras.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_extras.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ea984397f592291bfe533369e237358498f5db8 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mstats_extras.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mvn.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mvn.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31f1c5b462578e8b57d8580d669165cb45ac1fe7 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/mvn.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/qmc.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/qmc.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4efdb1d4d2f2d70b3ed48c73a256ddff1df9f397 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/qmc.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/sampling.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/sampling.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a313e8c560236070db2ebe6d56a6134d1c786884 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/sampling.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/stats.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/stats.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89a11aa27deb9ee48b5ffa878a335dca261ca654 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/__pycache__/stats.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__init__.py b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..681694192be623c0920955fd1bf8573e516060ce --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__init__.py @@ -0,0 +1,53 @@ +from scipy.stats._boost.beta_ufunc import ( + _beta_pdf, _beta_cdf, _beta_sf, _beta_ppf, + _beta_isf, _beta_mean, _beta_variance, + _beta_skewness, _beta_kurtosis_excess, +) + +from scipy.stats._boost.binom_ufunc import ( + _binom_pdf, _binom_cdf, _binom_sf, _binom_ppf, + _binom_isf, _binom_mean, _binom_variance, + _binom_skewness, _binom_kurtosis_excess, +) + +from scipy.stats._boost.nbinom_ufunc import ( + _nbinom_pdf, _nbinom_cdf, _nbinom_sf, _nbinom_ppf, + _nbinom_isf, _nbinom_mean, _nbinom_variance, + _nbinom_skewness, _nbinom_kurtosis_excess, +) + +from scipy.stats._boost.hypergeom_ufunc import ( + _hypergeom_pdf, _hypergeom_cdf, _hypergeom_sf, _hypergeom_ppf, + _hypergeom_isf, _hypergeom_mean, _hypergeom_variance, + _hypergeom_skewness, _hypergeom_kurtosis_excess, +) + +from scipy.stats._boost.ncf_ufunc import ( + _ncf_pdf, _ncf_cdf, _ncf_sf, _ncf_ppf, + _ncf_isf, _ncf_mean, _ncf_variance, + _ncf_skewness, _ncf_kurtosis_excess, +) + +from scipy.stats._boost.ncx2_ufunc import ( + _ncx2_pdf, _ncx2_cdf, _ncx2_sf, _ncx2_ppf, + _ncx2_isf, _ncx2_mean, _ncx2_variance, + _ncx2_skewness, _ncx2_kurtosis_excess, +) + +from scipy.stats._boost.nct_ufunc import ( + _nct_pdf, _nct_cdf, _nct_sf, _nct_ppf, + _nct_isf, _nct_mean, _nct_variance, + _nct_skewness, _nct_kurtosis_excess, +) + +from scipy.stats._boost.skewnorm_ufunc import ( + _skewnorm_pdf, _skewnorm_cdf, _skewnorm_sf, _skewnorm_ppf, + _skewnorm_isf, _skewnorm_mean, _skewnorm_variance, + _skewnorm_skewness, _skewnorm_kurtosis_excess, +) + +from scipy.stats._boost.invgauss_ufunc import ( + _invgauss_pdf, _invgauss_cdf, _invgauss_sf, _invgauss_ppf, + _invgauss_isf, _invgauss_mean, _invgauss_variance, + _invgauss_skewness, _invgauss_kurtosis_excess, +) diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__pycache__/__init__.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..748c4c51c937213eebcce2db1fbd3379255cf377 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/__pycache__/__init__.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/nbinom_ufunc.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/nbinom_ufunc.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..5e08881cfbdf9a548185c791e3bc057902e8fd83 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/nbinom_ufunc.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/ncx2_ufunc.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/ncx2_ufunc.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b6b23eef7d8139e4f34b600e5a9d6c4aa23f7b9a Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_boost/ncx2_ufunc.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__init__.py b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..13d143e3dd562e76d75c3517d2d999fcf5640c8f --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__init__.py @@ -0,0 +1,1224 @@ +# + +import warnings +from functools import partial + +import numpy as np + +from scipy import optimize +from scipy import integrate +from scipy.integrate._quadrature import _builtincoeffs +from scipy import interpolate +from scipy.interpolate import RectBivariateSpline +import scipy.special as sc +from scipy._lib._util import _lazywhere +from .._distn_infrastructure import rv_continuous, _ShapeInfo +from .._continuous_distns import uniform, expon, _norm_pdf, _norm_cdf +from .levyst import Nolan +from scipy._lib.doccer import inherit_docstring_from + + +__all__ = ["levy_stable", "levy_stable_gen", "pdf_from_cf_with_fft"] + +# Stable distributions are known for various parameterisations +# some being advantageous for numerical considerations and others +# useful due to their location/scale awareness. +# +# Here we follow [NO] convention (see the references in the docstring +# for levy_stable_gen below). +# +# S0 / Z0 / x0 (aka Zoleterav's M) +# S1 / Z1 / x1 +# +# Where S* denotes parameterisation, Z* denotes standardized +# version where gamma = 1, delta = 0 and x* denotes variable. +# +# Scipy's original Stable was a random variate generator. It +# uses S1 and unfortunately is not a location/scale aware. + + +# default numerical integration tolerance +# used for epsrel in piecewise and both epsrel and epsabs in dni +# (epsabs needed in dni since weighted quad requires epsabs > 0) +_QUAD_EPS = 1.2e-14 + + +def _Phi_Z0(alpha, t): + return ( + -np.tan(np.pi * alpha / 2) * (np.abs(t) ** (1 - alpha) - 1) + if alpha != 1 + else -2.0 * np.log(np.abs(t)) / np.pi + ) + + +def _Phi_Z1(alpha, t): + return ( + np.tan(np.pi * alpha / 2) + if alpha != 1 + else -2.0 * np.log(np.abs(t)) / np.pi + ) + + +def _cf(Phi, t, alpha, beta): + """Characteristic function.""" + return np.exp( + -(np.abs(t) ** alpha) * (1 - 1j * beta * np.sign(t) * Phi(alpha, t)) + ) + + +_cf_Z0 = partial(_cf, _Phi_Z0) +_cf_Z1 = partial(_cf, _Phi_Z1) + + +def _pdf_single_value_cf_integrate(Phi, x, alpha, beta, **kwds): + """To improve DNI accuracy convert characteristic function in to real + valued integral using Euler's formula, then exploit cosine symmetry to + change limits to [0, inf). Finally use cosine addition formula to split + into two parts that can be handled by weighted quad pack. + """ + quad_eps = kwds.get("quad_eps", _QUAD_EPS) + + def integrand1(t): + if t == 0: + return 0 + return np.exp(-(t ** alpha)) * ( + np.cos(beta * (t ** alpha) * Phi(alpha, t)) + ) + + def integrand2(t): + if t == 0: + return 0 + return np.exp(-(t ** alpha)) * ( + np.sin(beta * (t ** alpha) * Phi(alpha, t)) + ) + + with np.errstate(invalid="ignore"): + int1, *ret1 = integrate.quad( + integrand1, + 0, + np.inf, + weight="cos", + wvar=x, + limit=1000, + epsabs=quad_eps, + epsrel=quad_eps, + full_output=1, + ) + + int2, *ret2 = integrate.quad( + integrand2, + 0, + np.inf, + weight="sin", + wvar=x, + limit=1000, + epsabs=quad_eps, + epsrel=quad_eps, + full_output=1, + ) + + return (int1 + int2) / np.pi + + +_pdf_single_value_cf_integrate_Z0 = partial( + _pdf_single_value_cf_integrate, _Phi_Z0 +) +_pdf_single_value_cf_integrate_Z1 = partial( + _pdf_single_value_cf_integrate, _Phi_Z1 +) + + +def _nolan_round_x_near_zeta(x0, alpha, zeta, x_tol_near_zeta): + """Round x close to zeta for Nolan's method in [NO].""" + # "8. When |x0-beta*tan(pi*alpha/2)| is small, the + # computations of the density and cumulative have numerical problems. + # The program works around this by setting + # z = beta*tan(pi*alpha/2) when + # |z-beta*tan(pi*alpha/2)| < tol(5)*alpha**(1/alpha). + # (The bound on the right is ad hoc, to get reasonable behavior + # when alpha is small)." + # where tol(5) = 0.5e-2 by default. + # + # We seem to have partially addressed this through re-expression of + # g(theta) here, but it still needs to be used in some extreme cases. + # Perhaps tol(5) = 0.5e-2 could be reduced for our implementation. + if np.abs(x0 - zeta) < x_tol_near_zeta * alpha ** (1 / alpha): + x0 = zeta + return x0 + + +def _nolan_round_difficult_input( + x0, alpha, beta, zeta, x_tol_near_zeta, alpha_tol_near_one +): + """Round difficult input values for Nolan's method in [NO].""" + + # following Nolan's STABLE, + # "1. When 0 < |alpha-1| < 0.005, the program has numerical problems + # evaluating the pdf and cdf. The current version of the program sets + # alpha=1 in these cases. This approximation is not bad in the S0 + # parameterization." + if np.abs(alpha - 1) < alpha_tol_near_one: + alpha = 1.0 + + # "2. When alpha=1 and |beta| < 0.005, the program has numerical + # problems. The current version sets beta=0." + # We seem to have addressed this through re-expression of g(theta) here + + x0 = _nolan_round_x_near_zeta(x0, alpha, zeta, x_tol_near_zeta) + return x0, alpha, beta + + +def _pdf_single_value_piecewise_Z1(x, alpha, beta, **kwds): + # convert from Nolan's S_1 (aka S) to S_0 (aka Zolaterev M) + # parameterization + + zeta = -beta * np.tan(np.pi * alpha / 2.0) + x0 = x + zeta if alpha != 1 else x + + return _pdf_single_value_piecewise_Z0(x0, alpha, beta, **kwds) + + +def _pdf_single_value_piecewise_Z0(x0, alpha, beta, **kwds): + + quad_eps = kwds.get("quad_eps", _QUAD_EPS) + x_tol_near_zeta = kwds.get("piecewise_x_tol_near_zeta", 0.005) + alpha_tol_near_one = kwds.get("piecewise_alpha_tol_near_one", 0.005) + + zeta = -beta * np.tan(np.pi * alpha / 2.0) + x0, alpha, beta = _nolan_round_difficult_input( + x0, alpha, beta, zeta, x_tol_near_zeta, alpha_tol_near_one + ) + + # some other known distribution pdfs / analytical cases + # TODO: add more where possible with test coverage, + # eg https://en.wikipedia.org/wiki/Stable_distribution#Other_analytic_cases + if alpha == 2.0: + # normal + return _norm_pdf(x0 / np.sqrt(2)) / np.sqrt(2) + elif alpha == 0.5 and beta == 1.0: + # levy + # since S(1/2, 1, gamma, delta; ) == + # S(1/2, 1, gamma, gamma + delta; ). + _x = x0 + 1 + if _x <= 0: + return 0 + + return 1 / np.sqrt(2 * np.pi * _x) / _x * np.exp(-1 / (2 * _x)) + elif alpha == 0.5 and beta == 0.0 and x0 != 0: + # analytical solution [HO] + S, C = sc.fresnel([1 / np.sqrt(2 * np.pi * np.abs(x0))]) + arg = 1 / (4 * np.abs(x0)) + return ( + np.sin(arg) * (0.5 - S[0]) + np.cos(arg) * (0.5 - C[0]) + ) / np.sqrt(2 * np.pi * np.abs(x0) ** 3) + elif alpha == 1.0 and beta == 0.0: + # cauchy + return 1 / (1 + x0 ** 2) / np.pi + + return _pdf_single_value_piecewise_post_rounding_Z0( + x0, alpha, beta, quad_eps, x_tol_near_zeta + ) + + +def _pdf_single_value_piecewise_post_rounding_Z0(x0, alpha, beta, quad_eps, + x_tol_near_zeta): + """Calculate pdf using Nolan's methods as detailed in [NO].""" + + _nolan = Nolan(alpha, beta, x0) + zeta = _nolan.zeta + xi = _nolan.xi + c2 = _nolan.c2 + g = _nolan.g + + # round x0 to zeta again if needed. zeta was recomputed and may have + # changed due to floating point differences. + # See https://github.com/scipy/scipy/pull/18133 + x0 = _nolan_round_x_near_zeta(x0, alpha, zeta, x_tol_near_zeta) + # handle Nolan's initial case logic + if x0 == zeta: + return ( + sc.gamma(1 + 1 / alpha) + * np.cos(xi) + / np.pi + / ((1 + zeta ** 2) ** (1 / alpha / 2)) + ) + elif x0 < zeta: + return _pdf_single_value_piecewise_post_rounding_Z0( + -x0, alpha, -beta, quad_eps, x_tol_near_zeta + ) + + # following Nolan, we may now assume + # x0 > zeta when alpha != 1 + # beta != 0 when alpha == 1 + + # spare calculating integral on null set + # use isclose as macos has fp differences + if np.isclose(-xi, np.pi / 2, rtol=1e-014, atol=1e-014): + return 0.0 + + def integrand(theta): + # limit any numerical issues leading to g_1 < 0 near theta limits + g_1 = g(theta) + if not np.isfinite(g_1) or g_1 < 0: + g_1 = 0 + return g_1 * np.exp(-g_1) + + with np.errstate(all="ignore"): + peak = optimize.bisect( + lambda t: g(t) - 1, -xi, np.pi / 2, xtol=quad_eps + ) + + # this integrand can be very peaked, so we need to force + # QUADPACK to evaluate the function inside its support + # + + # lastly, we add additional samples at + # ~exp(-100), ~exp(-10), ~exp(-5), ~exp(-1) + # to improve QUADPACK's detection of rapidly descending tail behavior + # (this choice is fairly ad hoc) + tail_points = [ + optimize.bisect(lambda t: g(t) - exp_height, -xi, np.pi / 2) + for exp_height in [100, 10, 5] + # exp_height = 1 is handled by peak + ] + intg_points = [0, peak] + tail_points + intg, *ret = integrate.quad( + integrand, + -xi, + np.pi / 2, + points=intg_points, + limit=100, + epsrel=quad_eps, + epsabs=0, + full_output=1, + ) + + return c2 * intg + + +def _cdf_single_value_piecewise_Z1(x, alpha, beta, **kwds): + # convert from Nolan's S_1 (aka S) to S_0 (aka Zolaterev M) + # parameterization + + zeta = -beta * np.tan(np.pi * alpha / 2.0) + x0 = x + zeta if alpha != 1 else x + + return _cdf_single_value_piecewise_Z0(x0, alpha, beta, **kwds) + + +def _cdf_single_value_piecewise_Z0(x0, alpha, beta, **kwds): + + quad_eps = kwds.get("quad_eps", _QUAD_EPS) + x_tol_near_zeta = kwds.get("piecewise_x_tol_near_zeta", 0.005) + alpha_tol_near_one = kwds.get("piecewise_alpha_tol_near_one", 0.005) + + zeta = -beta * np.tan(np.pi * alpha / 2.0) + x0, alpha, beta = _nolan_round_difficult_input( + x0, alpha, beta, zeta, x_tol_near_zeta, alpha_tol_near_one + ) + + # some other known distribution cdfs / analytical cases + # TODO: add more where possible with test coverage, + # eg https://en.wikipedia.org/wiki/Stable_distribution#Other_analytic_cases + if alpha == 2.0: + # normal + return _norm_cdf(x0 / np.sqrt(2)) + elif alpha == 0.5 and beta == 1.0: + # levy + # since S(1/2, 1, gamma, delta; ) == + # S(1/2, 1, gamma, gamma + delta; ). + _x = x0 + 1 + if _x <= 0: + return 0 + + return sc.erfc(np.sqrt(0.5 / _x)) + elif alpha == 1.0 and beta == 0.0: + # cauchy + return 0.5 + np.arctan(x0) / np.pi + + return _cdf_single_value_piecewise_post_rounding_Z0( + x0, alpha, beta, quad_eps, x_tol_near_zeta + ) + + +def _cdf_single_value_piecewise_post_rounding_Z0(x0, alpha, beta, quad_eps, + x_tol_near_zeta): + """Calculate cdf using Nolan's methods as detailed in [NO].""" + _nolan = Nolan(alpha, beta, x0) + zeta = _nolan.zeta + xi = _nolan.xi + c1 = _nolan.c1 + # c2 = _nolan.c2 + c3 = _nolan.c3 + g = _nolan.g + # round x0 to zeta again if needed. zeta was recomputed and may have + # changed due to floating point differences. + # See https://github.com/scipy/scipy/pull/18133 + x0 = _nolan_round_x_near_zeta(x0, alpha, zeta, x_tol_near_zeta) + # handle Nolan's initial case logic + if (alpha == 1 and beta < 0) or x0 < zeta: + # NOTE: Nolan's paper has a typo here! + # He states F(x) = 1 - F(x, alpha, -beta), but this is clearly + # incorrect since F(-infty) would be 1.0 in this case + # Indeed, the alpha != 1, x0 < zeta case is correct here. + return 1 - _cdf_single_value_piecewise_post_rounding_Z0( + -x0, alpha, -beta, quad_eps, x_tol_near_zeta + ) + elif x0 == zeta: + return 0.5 - xi / np.pi + + # following Nolan, we may now assume + # x0 > zeta when alpha != 1 + # beta > 0 when alpha == 1 + + # spare calculating integral on null set + # use isclose as macos has fp differences + if np.isclose(-xi, np.pi / 2, rtol=1e-014, atol=1e-014): + return c1 + + def integrand(theta): + g_1 = g(theta) + return np.exp(-g_1) + + with np.errstate(all="ignore"): + # shrink supports where required + left_support = -xi + right_support = np.pi / 2 + if alpha > 1: + # integrand(t) monotonic 0 to 1 + if integrand(-xi) != 0.0: + res = optimize.minimize( + integrand, + (-xi,), + method="L-BFGS-B", + bounds=[(-xi, np.pi / 2)], + ) + left_support = res.x[0] + else: + # integrand(t) monotonic 1 to 0 + if integrand(np.pi / 2) != 0.0: + res = optimize.minimize( + integrand, + (np.pi / 2,), + method="L-BFGS-B", + bounds=[(-xi, np.pi / 2)], + ) + right_support = res.x[0] + + intg, *ret = integrate.quad( + integrand, + left_support, + right_support, + points=[left_support, right_support], + limit=100, + epsrel=quad_eps, + epsabs=0, + full_output=1, + ) + + return c1 + c3 * intg + + +def _rvs_Z1(alpha, beta, size=None, random_state=None): + """Simulate random variables using Nolan's methods as detailed in [NO]. + """ + + def alpha1func(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W): + return ( + 2 + / np.pi + * ( + (np.pi / 2 + bTH) * tanTH + - beta * np.log((np.pi / 2 * W * cosTH) / (np.pi / 2 + bTH)) + ) + ) + + def beta0func(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W): + return ( + W + / (cosTH / np.tan(aTH) + np.sin(TH)) + * ((np.cos(aTH) + np.sin(aTH) * tanTH) / W) ** (1.0 / alpha) + ) + + def otherwise(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W): + # alpha is not 1 and beta is not 0 + val0 = beta * np.tan(np.pi * alpha / 2) + th0 = np.arctan(val0) / alpha + val3 = W / (cosTH / np.tan(alpha * (th0 + TH)) + np.sin(TH)) + res3 = val3 * ( + ( + np.cos(aTH) + + np.sin(aTH) * tanTH + - val0 * (np.sin(aTH) - np.cos(aTH) * tanTH) + ) + / W + ) ** (1.0 / alpha) + return res3 + + def alphanot1func(alpha, beta, TH, aTH, bTH, cosTH, tanTH, W): + res = _lazywhere( + beta == 0, + (alpha, beta, TH, aTH, bTH, cosTH, tanTH, W), + beta0func, + f2=otherwise, + ) + return res + + alpha = np.broadcast_to(alpha, size) + beta = np.broadcast_to(beta, size) + TH = uniform.rvs( + loc=-np.pi / 2.0, scale=np.pi, size=size, random_state=random_state + ) + W = expon.rvs(size=size, random_state=random_state) + aTH = alpha * TH + bTH = beta * TH + cosTH = np.cos(TH) + tanTH = np.tan(TH) + res = _lazywhere( + alpha == 1, + (alpha, beta, TH, aTH, bTH, cosTH, tanTH, W), + alpha1func, + f2=alphanot1func, + ) + return res + + +def _fitstart_S0(data): + alpha, beta, delta1, gamma = _fitstart_S1(data) + + # Formulas for mapping parameters in S1 parameterization to + # those in S0 parameterization can be found in [NO]. Note that + # only delta changes. + if alpha != 1: + delta0 = delta1 + beta * gamma * np.tan(np.pi * alpha / 2.0) + else: + delta0 = delta1 + 2 * beta * gamma * np.log(gamma) / np.pi + + return alpha, beta, delta0, gamma + + +def _fitstart_S1(data): + # We follow McCullock 1986 method - Simple Consistent Estimators + # of Stable Distribution Parameters + + # fmt: off + # Table III and IV + nu_alpha_range = [2.439, 2.5, 2.6, 2.7, 2.8, 3, 3.2, 3.5, 4, + 5, 6, 8, 10, 15, 25] + nu_beta_range = [0, 0.1, 0.2, 0.3, 0.5, 0.7, 1] + + # table III - alpha = psi_1(nu_alpha, nu_beta) + alpha_table = np.array([ + [2.000, 2.000, 2.000, 2.000, 2.000, 2.000, 2.000], + [1.916, 1.924, 1.924, 1.924, 1.924, 1.924, 1.924], + [1.808, 1.813, 1.829, 1.829, 1.829, 1.829, 1.829], + [1.729, 1.730, 1.737, 1.745, 1.745, 1.745, 1.745], + [1.664, 1.663, 1.663, 1.668, 1.676, 1.676, 1.676], + [1.563, 1.560, 1.553, 1.548, 1.547, 1.547, 1.547], + [1.484, 1.480, 1.471, 1.460, 1.448, 1.438, 1.438], + [1.391, 1.386, 1.378, 1.364, 1.337, 1.318, 1.318], + [1.279, 1.273, 1.266, 1.250, 1.210, 1.184, 1.150], + [1.128, 1.121, 1.114, 1.101, 1.067, 1.027, 0.973], + [1.029, 1.021, 1.014, 1.004, 0.974, 0.935, 0.874], + [0.896, 0.892, 0.884, 0.883, 0.855, 0.823, 0.769], + [0.818, 0.812, 0.806, 0.801, 0.780, 0.756, 0.691], + [0.698, 0.695, 0.692, 0.689, 0.676, 0.656, 0.597], + [0.593, 0.590, 0.588, 0.586, 0.579, 0.563, 0.513]]).T + # transpose because interpolation with `RectBivariateSpline` is with + # `nu_beta` as `x` and `nu_alpha` as `y` + + # table IV - beta = psi_2(nu_alpha, nu_beta) + beta_table = np.array([ + [0, 2.160, 1.000, 1.000, 1.000, 1.000, 1.000], + [0, 1.592, 3.390, 1.000, 1.000, 1.000, 1.000], + [0, 0.759, 1.800, 1.000, 1.000, 1.000, 1.000], + [0, 0.482, 1.048, 1.694, 1.000, 1.000, 1.000], + [0, 0.360, 0.760, 1.232, 2.229, 1.000, 1.000], + [0, 0.253, 0.518, 0.823, 1.575, 1.000, 1.000], + [0, 0.203, 0.410, 0.632, 1.244, 1.906, 1.000], + [0, 0.165, 0.332, 0.499, 0.943, 1.560, 1.000], + [0, 0.136, 0.271, 0.404, 0.689, 1.230, 2.195], + [0, 0.109, 0.216, 0.323, 0.539, 0.827, 1.917], + [0, 0.096, 0.190, 0.284, 0.472, 0.693, 1.759], + [0, 0.082, 0.163, 0.243, 0.412, 0.601, 1.596], + [0, 0.074, 0.147, 0.220, 0.377, 0.546, 1.482], + [0, 0.064, 0.128, 0.191, 0.330, 0.478, 1.362], + [0, 0.056, 0.112, 0.167, 0.285, 0.428, 1.274]]).T + + # Table V and VII + # These are ordered with decreasing `alpha_range`; so we will need to + # reverse them as required by RectBivariateSpline. + alpha_range = [2, 1.9, 1.8, 1.7, 1.6, 1.5, 1.4, 1.3, 1.2, 1.1, + 1, 0.9, 0.8, 0.7, 0.6, 0.5][::-1] + beta_range = [0, 0.25, 0.5, 0.75, 1] + + # Table V - nu_c = psi_3(alpha, beta) + nu_c_table = np.array([ + [1.908, 1.908, 1.908, 1.908, 1.908], + [1.914, 1.915, 1.916, 1.918, 1.921], + [1.921, 1.922, 1.927, 1.936, 1.947], + [1.927, 1.930, 1.943, 1.961, 1.987], + [1.933, 1.940, 1.962, 1.997, 2.043], + [1.939, 1.952, 1.988, 2.045, 2.116], + [1.946, 1.967, 2.022, 2.106, 2.211], + [1.955, 1.984, 2.067, 2.188, 2.333], + [1.965, 2.007, 2.125, 2.294, 2.491], + [1.980, 2.040, 2.205, 2.435, 2.696], + [2.000, 2.085, 2.311, 2.624, 2.973], + [2.040, 2.149, 2.461, 2.886, 3.356], + [2.098, 2.244, 2.676, 3.265, 3.912], + [2.189, 2.392, 3.004, 3.844, 4.775], + [2.337, 2.634, 3.542, 4.808, 6.247], + [2.588, 3.073, 4.534, 6.636, 9.144]])[::-1].T + # transpose because interpolation with `RectBivariateSpline` is with + # `beta` as `x` and `alpha` as `y` + + # Table VII - nu_zeta = psi_5(alpha, beta) + nu_zeta_table = np.array([ + [0, 0.000, 0.000, 0.000, 0.000], + [0, -0.017, -0.032, -0.049, -0.064], + [0, -0.030, -0.061, -0.092, -0.123], + [0, -0.043, -0.088, -0.132, -0.179], + [0, -0.056, -0.111, -0.170, -0.232], + [0, -0.066, -0.134, -0.206, -0.283], + [0, -0.075, -0.154, -0.241, -0.335], + [0, -0.084, -0.173, -0.276, -0.390], + [0, -0.090, -0.192, -0.310, -0.447], + [0, -0.095, -0.208, -0.346, -0.508], + [0, -0.098, -0.223, -0.380, -0.576], + [0, -0.099, -0.237, -0.424, -0.652], + [0, -0.096, -0.250, -0.469, -0.742], + [0, -0.089, -0.262, -0.520, -0.853], + [0, -0.078, -0.272, -0.581, -0.997], + [0, -0.061, -0.279, -0.659, -1.198]])[::-1].T + # fmt: on + + psi_1 = RectBivariateSpline(nu_beta_range, nu_alpha_range, + alpha_table, kx=1, ky=1, s=0) + + def psi_1_1(nu_beta, nu_alpha): + return psi_1(nu_beta, nu_alpha) \ + if nu_beta > 0 else psi_1(-nu_beta, nu_alpha) + + psi_2 = RectBivariateSpline(nu_beta_range, nu_alpha_range, + beta_table, kx=1, ky=1, s=0) + + def psi_2_1(nu_beta, nu_alpha): + return psi_2(nu_beta, nu_alpha) \ + if nu_beta > 0 else -psi_2(-nu_beta, nu_alpha) + + phi_3 = RectBivariateSpline(beta_range, alpha_range, nu_c_table, + kx=1, ky=1, s=0) + + def phi_3_1(beta, alpha): + return phi_3(beta, alpha) if beta > 0 else phi_3(-beta, alpha) + + phi_5 = RectBivariateSpline(beta_range, alpha_range, nu_zeta_table, + kx=1, ky=1, s=0) + + def phi_5_1(beta, alpha): + return phi_5(beta, alpha) if beta > 0 else -phi_5(-beta, alpha) + + # quantiles + p05 = np.percentile(data, 5) + p50 = np.percentile(data, 50) + p95 = np.percentile(data, 95) + p25 = np.percentile(data, 25) + p75 = np.percentile(data, 75) + + nu_alpha = (p95 - p05) / (p75 - p25) + nu_beta = (p95 + p05 - 2 * p50) / (p95 - p05) + + if nu_alpha >= 2.439: + eps = np.finfo(float).eps + alpha = np.clip(psi_1_1(nu_beta, nu_alpha)[0, 0], eps, 2.) + beta = np.clip(psi_2_1(nu_beta, nu_alpha)[0, 0], -1.0, 1.0) + else: + alpha = 2.0 + beta = np.sign(nu_beta) + c = (p75 - p25) / phi_3_1(beta, alpha)[0, 0] + zeta = p50 + c * phi_5_1(beta, alpha)[0, 0] + delta = zeta-beta*c*np.tan(np.pi*alpha/2.) if alpha != 1. else zeta + + return (alpha, beta, delta, c) + + +class levy_stable_gen(rv_continuous): + r"""A Levy-stable continuous random variable. + + %(before_notes)s + + See Also + -------- + levy, levy_l, cauchy, norm + + Notes + ----- + The distribution for `levy_stable` has characteristic function: + + .. math:: + + \varphi(t, \alpha, \beta, c, \mu) = + e^{it\mu -|ct|^{\alpha}(1-i\beta\operatorname{sign}(t)\Phi(\alpha, t))} + + where two different parameterizations are supported. The first :math:`S_1`: + + .. math:: + + \Phi = \begin{cases} + \tan \left({\frac {\pi \alpha }{2}}\right)&\alpha \neq 1\\ + -{\frac {2}{\pi }}\log |t|&\alpha =1 + \end{cases} + + The second :math:`S_0`: + + .. math:: + + \Phi = \begin{cases} + -\tan \left({\frac {\pi \alpha }{2}}\right)(|ct|^{1-\alpha}-1) + &\alpha \neq 1\\ + -{\frac {2}{\pi }}\log |ct|&\alpha =1 + \end{cases} + + + The probability density function for `levy_stable` is: + + .. math:: + + f(x) = \frac{1}{2\pi}\int_{-\infty}^\infty \varphi(t)e^{-ixt}\,dt + + where :math:`-\infty < t < \infty`. This integral does not have a known + closed form. + + `levy_stable` generalizes several distributions. Where possible, they + should be used instead. Specifically, when the shape parameters + assume the values in the table below, the corresponding equivalent + distribution should be used. + + ========= ======== =========== + ``alpha`` ``beta`` Equivalent + ========= ======== =========== + 1/2 -1 `levy_l` + 1/2 1 `levy` + 1 0 `cauchy` + 2 any `norm` (with ``scale=sqrt(2)``) + ========= ======== =========== + + Evaluation of the pdf uses Nolan's piecewise integration approach with the + Zolotarev :math:`M` parameterization by default. There is also the option + to use direct numerical integration of the standard parameterization of the + characteristic function or to evaluate by taking the FFT of the + characteristic function. + + The default method can changed by setting the class variable + ``levy_stable.pdf_default_method`` to one of 'piecewise' for Nolan's + approach, 'dni' for direct numerical integration, or 'fft-simpson' for the + FFT based approach. For the sake of backwards compatibility, the methods + 'best' and 'zolotarev' are equivalent to 'piecewise' and the method + 'quadrature' is equivalent to 'dni'. + + The parameterization can be changed by setting the class variable + ``levy_stable.parameterization`` to either 'S0' or 'S1'. + The default is 'S1'. + + To improve performance of piecewise and direct numerical integration one + can specify ``levy_stable.quad_eps`` (defaults to 1.2e-14). This is used + as both the absolute and relative quadrature tolerance for direct numerical + integration and as the relative quadrature tolerance for the piecewise + method. One can also specify ``levy_stable.piecewise_x_tol_near_zeta`` + (defaults to 0.005) for how close x is to zeta before it is considered the + same as x [NO]. The exact check is + ``abs(x0 - zeta) < piecewise_x_tol_near_zeta*alpha**(1/alpha)``. One can + also specify ``levy_stable.piecewise_alpha_tol_near_one`` (defaults to + 0.005) for how close alpha is to 1 before being considered equal to 1. + + To increase accuracy of FFT calculation one can specify + ``levy_stable.pdf_fft_grid_spacing`` (defaults to 0.001) and + ``pdf_fft_n_points_two_power`` (defaults to None which means a value is + calculated that sufficiently covers the input range). + + Further control over FFT calculation is available by setting + ``pdf_fft_interpolation_degree`` (defaults to 3) for spline order and + ``pdf_fft_interpolation_level`` for determining the number of points to use + in the Newton-Cotes formula when approximating the characteristic function + (considered experimental). + + Evaluation of the cdf uses Nolan's piecewise integration approach with the + Zolatarev :math:`S_0` parameterization by default. There is also the option + to evaluate through integration of an interpolated spline of the pdf + calculated by means of the FFT method. The settings affecting FFT + calculation are the same as for pdf calculation. The default cdf method can + be changed by setting ``levy_stable.cdf_default_method`` to either + 'piecewise' or 'fft-simpson'. For cdf calculations the Zolatarev method is + superior in accuracy, so FFT is disabled by default. + + Fitting estimate uses quantile estimation method in [MC]. MLE estimation of + parameters in fit method uses this quantile estimate initially. Note that + MLE doesn't always converge if using FFT for pdf calculations; this will be + the case if alpha <= 1 where the FFT approach doesn't give good + approximations. + + Any non-missing value for the attribute + ``levy_stable.pdf_fft_min_points_threshold`` will set + ``levy_stable.pdf_default_method`` to 'fft-simpson' if a valid + default method is not otherwise set. + + + + .. warning:: + + For pdf calculations FFT calculation is considered experimental. + + For cdf calculations FFT calculation is considered experimental. Use + Zolatarev's method instead (default). + + The probability density above is defined in the "standardized" form. To + shift and/or scale the distribution use the ``loc`` and ``scale`` + parameters. + Generally ``%(name)s.pdf(x, %(shapes)s, loc, scale)`` is identically + equivalent to ``%(name)s.pdf(y, %(shapes)s) / scale`` with + ``y = (x - loc) / scale``, except in the ``S1`` parameterization if + ``alpha == 1``. In that case ``%(name)s.pdf(x, %(shapes)s, loc, scale)`` + is identically equivalent to ``%(name)s.pdf(y, %(shapes)s) / scale`` with + ``y = (x - loc - 2 * beta * scale * np.log(scale) / np.pi) / scale``. + See [NO2]_ Definition 1.8 for more information. + Note that shifting the location of a distribution + does not make it a "noncentral" distribution. + + References + ---------- + .. [MC] McCulloch, J., 1986. Simple consistent estimators of stable + distribution parameters. Communications in Statistics - Simulation and + Computation 15, 11091136. + .. [WZ] Wang, Li and Zhang, Ji-Hong, 2008. Simpson's rule based FFT method + to compute densities of stable distribution. + .. [NO] Nolan, J., 1997. Numerical Calculation of Stable Densities and + distributions Functions. + .. [NO2] Nolan, J., 2018. Stable Distributions: Models for Heavy Tailed + Data. + .. [HO] Hopcraft, K. I., Jakeman, E., Tanner, R. M. J., 1999. Lévy random + walks with fluctuating step number and multiscale behavior. + + %(example)s + + """ + # Configurable options as class variables + # (accessible from self by attribute lookup). + parameterization = "S1" + pdf_default_method = "piecewise" + cdf_default_method = "piecewise" + quad_eps = _QUAD_EPS + piecewise_x_tol_near_zeta = 0.005 + piecewise_alpha_tol_near_one = 0.005 + pdf_fft_min_points_threshold = None + pdf_fft_grid_spacing = 0.001 + pdf_fft_n_points_two_power = None + pdf_fft_interpolation_level = 3 + pdf_fft_interpolation_degree = 3 + + def _argcheck(self, alpha, beta): + return (alpha > 0) & (alpha <= 2) & (beta <= 1) & (beta >= -1) + + def _shape_info(self): + ialpha = _ShapeInfo("alpha", False, (0, 2), (False, True)) + ibeta = _ShapeInfo("beta", False, (-1, 1), (True, True)) + return [ialpha, ibeta] + + def _parameterization(self): + allowed = ("S0", "S1") + pz = self.parameterization + if pz not in allowed: + raise RuntimeError( + f"Parameterization '{pz}' in supported list: {allowed}" + ) + return pz + + @inherit_docstring_from(rv_continuous) + def rvs(self, *args, **kwds): + X1 = super().rvs(*args, **kwds) + + kwds.pop("discrete", None) + kwds.pop("random_state", None) + (alpha, beta), delta, gamma, size = self._parse_args_rvs(*args, **kwds) + + # shift location for this parameterisation (S1) + X1 = np.where( + alpha == 1.0, X1 + 2 * beta * gamma * np.log(gamma) / np.pi, X1 + ) + + if self._parameterization() == "S0": + return np.where( + alpha == 1.0, + X1 - (beta * 2 * gamma * np.log(gamma) / np.pi), + X1 - gamma * beta * np.tan(np.pi * alpha / 2.0), + ) + elif self._parameterization() == "S1": + return X1 + + def _rvs(self, alpha, beta, size=None, random_state=None): + return _rvs_Z1(alpha, beta, size, random_state) + + @inherit_docstring_from(rv_continuous) + def pdf(self, x, *args, **kwds): + # override base class version to correct + # location for S1 parameterization + if self._parameterization() == "S0": + return super().pdf(x, *args, **kwds) + elif self._parameterization() == "S1": + (alpha, beta), delta, gamma = self._parse_args(*args, **kwds) + if np.all(np.reshape(alpha, (1, -1))[0, :] != 1): + return super().pdf(x, *args, **kwds) + else: + # correct location for this parameterisation + x = np.reshape(x, (1, -1))[0, :] + x, alpha, beta = np.broadcast_arrays(x, alpha, beta) + + data_in = np.dstack((x, alpha, beta))[0] + data_out = np.empty(shape=(len(data_in), 1)) + # group data in unique arrays of alpha, beta pairs + uniq_param_pairs = np.unique(data_in[:, 1:], axis=0) + for pair in uniq_param_pairs: + _alpha, _beta = pair + _delta = ( + delta + 2 * _beta * gamma * np.log(gamma) / np.pi + if _alpha == 1.0 + else delta + ) + data_mask = np.all(data_in[:, 1:] == pair, axis=-1) + _x = data_in[data_mask, 0] + data_out[data_mask] = ( + super() + .pdf(_x, _alpha, _beta, loc=_delta, scale=gamma) + .reshape(len(_x), 1) + ) + output = data_out.T[0] + if output.shape == (1,): + return output[0] + return output + + def _pdf(self, x, alpha, beta): + if self._parameterization() == "S0": + _pdf_single_value_piecewise = _pdf_single_value_piecewise_Z0 + _pdf_single_value_cf_integrate = _pdf_single_value_cf_integrate_Z0 + _cf = _cf_Z0 + elif self._parameterization() == "S1": + _pdf_single_value_piecewise = _pdf_single_value_piecewise_Z1 + _pdf_single_value_cf_integrate = _pdf_single_value_cf_integrate_Z1 + _cf = _cf_Z1 + + x = np.asarray(x).reshape(1, -1)[0, :] + + x, alpha, beta = np.broadcast_arrays(x, alpha, beta) + + data_in = np.dstack((x, alpha, beta))[0] + data_out = np.empty(shape=(len(data_in), 1)) + + pdf_default_method_name = self.pdf_default_method + if pdf_default_method_name in ("piecewise", "best", "zolotarev"): + pdf_single_value_method = _pdf_single_value_piecewise + elif pdf_default_method_name in ("dni", "quadrature"): + pdf_single_value_method = _pdf_single_value_cf_integrate + elif ( + pdf_default_method_name == "fft-simpson" + or self.pdf_fft_min_points_threshold is not None + ): + pdf_single_value_method = None + + pdf_single_value_kwds = { + "quad_eps": self.quad_eps, + "piecewise_x_tol_near_zeta": self.piecewise_x_tol_near_zeta, + "piecewise_alpha_tol_near_one": self.piecewise_alpha_tol_near_one, + } + + fft_grid_spacing = self.pdf_fft_grid_spacing + fft_n_points_two_power = self.pdf_fft_n_points_two_power + fft_interpolation_level = self.pdf_fft_interpolation_level + fft_interpolation_degree = self.pdf_fft_interpolation_degree + + # group data in unique arrays of alpha, beta pairs + uniq_param_pairs = np.unique(data_in[:, 1:], axis=0) + for pair in uniq_param_pairs: + data_mask = np.all(data_in[:, 1:] == pair, axis=-1) + data_subset = data_in[data_mask] + if pdf_single_value_method is not None: + data_out[data_mask] = np.array( + [ + pdf_single_value_method( + _x, _alpha, _beta, **pdf_single_value_kwds + ) + for _x, _alpha, _beta in data_subset + ] + ).reshape(len(data_subset), 1) + else: + warnings.warn( + "Density calculations experimental for FFT method." + + " Use combination of piecewise and dni methods instead.", + RuntimeWarning, stacklevel=3, + ) + _alpha, _beta = pair + _x = data_subset[:, (0,)] + + if _alpha < 1.0: + raise RuntimeError( + "FFT method does not work well for alpha less than 1." + ) + + # need enough points to "cover" _x for interpolation + if fft_grid_spacing is None and fft_n_points_two_power is None: + raise ValueError( + "One of fft_grid_spacing or fft_n_points_two_power " + + "needs to be set." + ) + max_abs_x = np.max(np.abs(_x)) + h = ( + 2 ** (3 - fft_n_points_two_power) * max_abs_x + if fft_grid_spacing is None + else fft_grid_spacing + ) + q = ( + np.ceil(np.log(2 * max_abs_x / h) / np.log(2)) + 2 + if fft_n_points_two_power is None + else int(fft_n_points_two_power) + ) + + # for some parameters, the range of x can be quite + # large, let's choose an arbitrary cut off (8GB) to save on + # computer memory. + MAX_Q = 30 + if q > MAX_Q: + raise RuntimeError( + "fft_n_points_two_power has a maximum " + + f"value of {MAX_Q}" + ) + + density_x, density = pdf_from_cf_with_fft( + lambda t: _cf(t, _alpha, _beta), + h=h, + q=q, + level=fft_interpolation_level, + ) + f = interpolate.InterpolatedUnivariateSpline( + density_x, np.real(density), k=fft_interpolation_degree + ) # patch FFT to use cubic + data_out[data_mask] = f(_x) + + return data_out.T[0] + + @inherit_docstring_from(rv_continuous) + def cdf(self, x, *args, **kwds): + # override base class version to correct + # location for S1 parameterization + # NOTE: this is near identical to pdf() above + if self._parameterization() == "S0": + return super().cdf(x, *args, **kwds) + elif self._parameterization() == "S1": + (alpha, beta), delta, gamma = self._parse_args(*args, **kwds) + if np.all(np.reshape(alpha, (1, -1))[0, :] != 1): + return super().cdf(x, *args, **kwds) + else: + # correct location for this parameterisation + x = np.reshape(x, (1, -1))[0, :] + x, alpha, beta = np.broadcast_arrays(x, alpha, beta) + + data_in = np.dstack((x, alpha, beta))[0] + data_out = np.empty(shape=(len(data_in), 1)) + # group data in unique arrays of alpha, beta pairs + uniq_param_pairs = np.unique(data_in[:, 1:], axis=0) + for pair in uniq_param_pairs: + _alpha, _beta = pair + _delta = ( + delta + 2 * _beta * gamma * np.log(gamma) / np.pi + if _alpha == 1.0 + else delta + ) + data_mask = np.all(data_in[:, 1:] == pair, axis=-1) + _x = data_in[data_mask, 0] + data_out[data_mask] = ( + super() + .cdf(_x, _alpha, _beta, loc=_delta, scale=gamma) + .reshape(len(_x), 1) + ) + output = data_out.T[0] + if output.shape == (1,): + return output[0] + return output + + def _cdf(self, x, alpha, beta): + if self._parameterization() == "S0": + _cdf_single_value_piecewise = _cdf_single_value_piecewise_Z0 + _cf = _cf_Z0 + elif self._parameterization() == "S1": + _cdf_single_value_piecewise = _cdf_single_value_piecewise_Z1 + _cf = _cf_Z1 + + x = np.asarray(x).reshape(1, -1)[0, :] + + x, alpha, beta = np.broadcast_arrays(x, alpha, beta) + + data_in = np.dstack((x, alpha, beta))[0] + data_out = np.empty(shape=(len(data_in), 1)) + + cdf_default_method_name = self.cdf_default_method + if cdf_default_method_name == "piecewise": + cdf_single_value_method = _cdf_single_value_piecewise + elif cdf_default_method_name == "fft-simpson": + cdf_single_value_method = None + + cdf_single_value_kwds = { + "quad_eps": self.quad_eps, + "piecewise_x_tol_near_zeta": self.piecewise_x_tol_near_zeta, + "piecewise_alpha_tol_near_one": self.piecewise_alpha_tol_near_one, + } + + fft_grid_spacing = self.pdf_fft_grid_spacing + fft_n_points_two_power = self.pdf_fft_n_points_two_power + fft_interpolation_level = self.pdf_fft_interpolation_level + fft_interpolation_degree = self.pdf_fft_interpolation_degree + + # group data in unique arrays of alpha, beta pairs + uniq_param_pairs = np.unique(data_in[:, 1:], axis=0) + for pair in uniq_param_pairs: + data_mask = np.all(data_in[:, 1:] == pair, axis=-1) + data_subset = data_in[data_mask] + if cdf_single_value_method is not None: + data_out[data_mask] = np.array( + [ + cdf_single_value_method( + _x, _alpha, _beta, **cdf_single_value_kwds + ) + for _x, _alpha, _beta in data_subset + ] + ).reshape(len(data_subset), 1) + else: + warnings.warn( + "Cumulative density calculations experimental for FFT" + + " method. Use piecewise method instead.", + RuntimeWarning, stacklevel=3, + ) + _alpha, _beta = pair + _x = data_subset[:, (0,)] + + # need enough points to "cover" _x for interpolation + if fft_grid_spacing is None and fft_n_points_two_power is None: + raise ValueError( + "One of fft_grid_spacing or fft_n_points_two_power " + + "needs to be set." + ) + max_abs_x = np.max(np.abs(_x)) + h = ( + 2 ** (3 - fft_n_points_two_power) * max_abs_x + if fft_grid_spacing is None + else fft_grid_spacing + ) + q = ( + np.ceil(np.log(2 * max_abs_x / h) / np.log(2)) + 2 + if fft_n_points_two_power is None + else int(fft_n_points_two_power) + ) + + density_x, density = pdf_from_cf_with_fft( + lambda t: _cf(t, _alpha, _beta), + h=h, + q=q, + level=fft_interpolation_level, + ) + f = interpolate.InterpolatedUnivariateSpline( + density_x, np.real(density), k=fft_interpolation_degree + ) + data_out[data_mask] = np.array( + [f.integral(self.a, float(x_1.squeeze())) for x_1 in _x] + ).reshape(data_out[data_mask].shape) + + return data_out.T[0] + + def _fitstart(self, data): + if self._parameterization() == "S0": + _fitstart = _fitstart_S0 + elif self._parameterization() == "S1": + _fitstart = _fitstart_S1 + return _fitstart(data) + + def _stats(self, alpha, beta): + mu = 0 if alpha > 1 else np.nan + mu2 = 2 if alpha == 2 else np.inf + g1 = 0.0 if alpha == 2.0 else np.nan + g2 = 0.0 if alpha == 2.0 else np.nan + return mu, mu2, g1, g2 + + +# cotes numbers - see sequence from http://oeis.org/A100642 +Cotes_table = np.array( + [[], [1]] + [v[2] for v in _builtincoeffs.values()], dtype=object +) +Cotes = np.array( + [ + np.pad(r, (0, len(Cotes_table) - 1 - len(r)), mode='constant') + for r in Cotes_table + ] +) + + +def pdf_from_cf_with_fft(cf, h=0.01, q=9, level=3): + """Calculates pdf from characteristic function. + + Uses fast Fourier transform with Newton-Cotes integration following [WZ]. + Defaults to using Simpson's method (3-point Newton-Cotes integration). + + Parameters + ---------- + cf : callable + Single argument function from float -> complex expressing a + characteristic function for some distribution. + h : Optional[float] + Step size for Newton-Cotes integration. Default: 0.01 + q : Optional[int] + Use 2**q steps when performing Newton-Cotes integration. + The infinite integral in the inverse Fourier transform will then + be restricted to the interval [-2**q * h / 2, 2**q * h / 2]. Setting + the number of steps equal to a power of 2 allows the fft to be + calculated in O(n*log(n)) time rather than O(n**2). + Default: 9 + level : Optional[int] + Calculate integral using n-point Newton-Cotes integration for + n = level. The 3-point Newton-Cotes formula corresponds to Simpson's + rule. Default: 3 + + Returns + ------- + x_l : ndarray + Array of points x at which pdf is estimated. 2**q equally spaced + points from -pi/h up to but not including pi/h. + density : ndarray + Estimated values of pdf corresponding to cf at points in x_l. + + References + ---------- + .. [WZ] Wang, Li and Zhang, Ji-Hong, 2008. Simpson's rule based FFT method + to compute densities of stable distribution. + """ + n = level + N = 2**q + steps = np.arange(0, N) + L = N * h / 2 + x_l = np.pi * (steps - N / 2) / L + if level > 1: + indices = np.arange(n).reshape(n, 1) + s1 = np.sum( + (-1) ** steps * Cotes[n, indices] * np.fft.fft( + (-1)**steps * cf(-L + h * steps + h * indices / (n - 1)) + ) * np.exp( + 1j * np.pi * indices / (n - 1) + - 2 * 1j * np.pi * indices * steps / + (N * (n - 1)) + ), + axis=0 + ) + else: + s1 = (-1) ** steps * Cotes[n, 0] * np.fft.fft( + (-1) ** steps * cf(-L + h * steps) + ) + density = h * s1 / (2 * np.pi * np.sum(Cotes[n])) + return (x_l, density) + + +levy_stable = levy_stable_gen(name="levy_stable") diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__pycache__/__init__.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8f09314ea5c45efd5cba3f98c7a27b8077062e2 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/__pycache__/__init__.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/levyst.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/levyst.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..c66cde2da5b812735d070885f9a3b0f0bb7c15cb Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_levy_stable/levyst.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__init__.py b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..25728ead5f7ea277e6e94c359d5a5603b99eeb38 --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__init__.py @@ -0,0 +1,4 @@ +# +from .rcont import rvs_rcont1, rvs_rcont2 + +__all__ = ["rvs_rcont1", "rvs_rcont2"] diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__pycache__/__init__.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..22a5b27935f40d4699282e6df52a82510fe2580c Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/__pycache__/__init__.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/rcont.cpython-310-x86_64-linux-gnu.so b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/rcont.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..4c6a60542e13ecf190258c84953b8e2c9706ef52 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_rcont/rcont.cpython-310-x86_64-linux-gnu.so differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/__init__.py b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/__pycache__/__init__.cpython-310.pyc b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f9cdf600ee635e919b3b61641accdf5f53e0864 Binary files /dev/null and b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/__pycache__/__init__.cpython-310.pyc differ diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/unuran_wrapper.pyi b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/unuran_wrapper.pyi new file mode 100644 index 0000000000000000000000000000000000000000..96b6d4e65edfd8e7264ef6905d4706303e552702 --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/_unuran/unuran_wrapper.pyi @@ -0,0 +1,179 @@ +from __future__ import annotations +import numpy as np +from typing import (overload, Callable, NamedTuple, Protocol) +import numpy.typing as npt +from scipy._lib._util import SeedType +import scipy.stats as stats + + +ArrayLike0D = bool | int | float | complex | str | bytes | np.generic + + +__all__: list[str] + + +class UNURANError(RuntimeError): + ... + + +class Method: + @overload + def rvs(self, size: None = ...) -> float | int: ... # type: ignore[misc] + @overload + def rvs(self, size: int | tuple[int, ...] = ...) -> np.ndarray: ... + def set_random_state(self, random_state: SeedType) -> None: ... + + +class TDRDist(Protocol): + @property + def pdf(self) -> Callable[..., float]: ... + @property + def dpdf(self) -> Callable[..., float]: ... + @property + def support(self) -> tuple[float, float]: ... + + +class TransformedDensityRejection(Method): + def __init__(self, + dist: TDRDist, + *, + mode: None | float = ..., + center: None | float = ..., + domain: None | tuple[float, float] = ..., + c: float = ..., + construction_points: int | npt.ArrayLike = ..., + use_dars: bool = ..., + max_squeeze_hat_ratio: float = ..., + random_state: SeedType = ...) -> None: ... + @property + def squeeze_hat_ratio(self) -> float: ... + @property + def squeeze_area(self) -> float: ... + @overload + def ppf_hat(self, u: ArrayLike0D) -> float: ... # type: ignore[misc] + @overload + def ppf_hat(self, u: npt.ArrayLike) -> np.ndarray: ... + + +class SROUDist(Protocol): + @property + def pdf(self) -> Callable[..., float]: ... + @property + def support(self) -> tuple[float, float]: ... + + +class SimpleRatioUniforms(Method): + def __init__(self, + dist: SROUDist, + *, + mode: None | float = ..., + pdf_area: float = ..., + domain: None | tuple[float, float] = ..., + cdf_at_mode: float = ..., + random_state: SeedType = ...) -> None: ... + + +class UError(NamedTuple): + max_error: float + mean_absolute_error: float + +class PINVDist(Protocol): + @property + def pdf(self) -> Callable[..., float]: ... + @property + def cdf(self) -> Callable[..., float]: ... + @property + def logpdf(self) -> Callable[..., float]: ... + + +class NumericalInversePolynomial(Method): + def __init__(self, + dist: PINVDist, + *, + mode: None | float = ..., + center: None | float = ..., + domain: None | tuple[float, float] = ..., + order: int = ..., + u_resolution: float = ..., + random_state: SeedType = ...) -> None: ... + @property + def intervals(self) -> int: ... + @overload + def ppf(self, u: ArrayLike0D) -> float: ... # type: ignore[misc] + @overload + def ppf(self, u: npt.ArrayLike) -> np.ndarray: ... + @overload + def cdf(self, x: ArrayLike0D) -> float: ... # type: ignore[misc] + @overload + def cdf(self, x: npt.ArrayLike) -> np.ndarray: ... + def u_error(self, sample_size: int = ...) -> UError: ... + def qrvs(self, + size: None | int | tuple[int, ...] = ..., + d: None | int = ..., + qmc_engine: None | stats.qmc.QMCEngine = ...) -> npt.ArrayLike: ... + + +class HINVDist(Protocol): + @property + def pdf(self) -> Callable[..., float]: ... + @property + def cdf(self) -> Callable[..., float]: ... + @property + def support(self) -> tuple[float, float]: ... + + +class NumericalInverseHermite(Method): + def __init__(self, + dist: HINVDist, + *, + domain: None | tuple[float, float] = ..., + order: int= ..., + u_resolution: float = ..., + construction_points: None | npt.ArrayLike = ..., + max_intervals: int = ..., + random_state: SeedType = ...) -> None: ... + @property + def intervals(self) -> int: ... + @overload + def ppf(self, u: ArrayLike0D) -> float: ... # type: ignore[misc] + @overload + def ppf(self, u: npt.ArrayLike) -> np.ndarray: ... + def qrvs(self, + size: None | int | tuple[int, ...] = ..., + d: None | int = ..., + qmc_engine: None | stats.qmc.QMCEngine = ...) -> npt.ArrayLike: ... + def u_error(self, sample_size: int = ...) -> UError: ... + + +class DAUDist(Protocol): + @property + def pmf(self) -> Callable[..., float]: ... + @property + def support(self) -> tuple[float, float]: ... + +class DiscreteAliasUrn(Method): + def __init__(self, + dist: npt.ArrayLike | DAUDist, + *, + domain: None | tuple[float, float] = ..., + urn_factor: float = ..., + random_state: SeedType = ...) -> None: ... + + +class DGTDist(Protocol): + @property + def pmf(self) -> Callable[..., float]: ... + @property + def support(self) -> tuple[float, float]: ... + +class DiscreteGuideTable(Method): + def __init__(self, + dist: npt.ArrayLike | DGTDist, + *, + domain: None | tuple[float, float] = ..., + guide_factor: float = ..., + random_state: SeedType = ...) -> None: ... + @overload + def ppf(self, u: ArrayLike0D) -> float: ... # type: ignore[misc] + @overload + def ppf(self, u: npt.ArrayLike) -> np.ndarray: ... diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-Z1-cdf-sample-data.npy b/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-Z1-cdf-sample-data.npy new file mode 100644 index 0000000000000000000000000000000000000000..adda664a7b5442fc0977ddbaa572c864ddd31f08 --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-Z1-cdf-sample-data.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf18c1f2d65a232bf2c7121282df31bf2a8be827afafc4ed810ed37457ee898a +size 183728 diff --git a/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-loc-scale-sample-data.npy b/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-loc-scale-sample-data.npy new file mode 100644 index 0000000000000000000000000000000000000000..0a1460e407521836a9b73a081609af4ccdb6deae --- /dev/null +++ b/env-llmeval/lib/python3.10/site-packages/scipy/stats/tests/data/levy_stable/stable-loc-scale-sample-data.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3c719edd5431fb9e7b9ecb6d19e3ca7a9095298bd19f226685b0fca40f0c073 +size 9328