From d9d2230862c58078803014f2861618635de54291 Mon Sep 17 00:00:00 2001 From: jorenham Date: Wed, 28 Aug 2024 21:16:40 +0200 Subject: [PATCH] type-hint `scipy.stats._discrete_distns` --- scipy-stubs/stats/_discrete_distns.pyi | 126 ++++++++++--------------- 1 file changed, 50 insertions(+), 76 deletions(-) diff --git a/scipy-stubs/stats/_discrete_distns.pyi b/scipy-stubs/stats/_discrete_distns.pyi index 97efcd93..0182e172 100644 --- a/scipy-stubs/stats/_discrete_distns.pyi +++ b/scipy-stubs/stats/_discrete_distns.pyi @@ -1,95 +1,69 @@ -from ._distn_infrastructure import get_distribution_names as get_distribution_names, rv_discrete as rv_discrete -from scipy import special as special -from scipy._lib._util import rng_integers as rng_integers -from scipy._typing import Untyped -from scipy.interpolate import interp1d as interp1d -from scipy.special import betaln as betaln, entr as entr, logsumexp as logsumexp, zeta as zeta +from typing import Final + +from ._distn_infrastructure import rv_discrete + +__all__ = [ + "bernoulli", + "betabinom", + "betanbinom", + "binom", + "boltzmann", + "dlaplace", + "geom", + "hypergeom", + "logser", + "nbinom", + "nchypergeom_fisher", + "nchypergeom_wallenius", + "nhypergeom", + "planck", + "poisson", + "randint", + "skellam", + "yulesimon", + "zipf", + "zipfian", +] class binom_gen(rv_discrete): ... - -binom: Untyped - class bernoulli_gen(binom_gen): ... - -bernoulli: Untyped - class betabinom_gen(rv_discrete): ... - -betabinom: Untyped - class nbinom_gen(rv_discrete): ... - -nbinom: Untyped - class betanbinom_gen(rv_discrete): ... - -betanbinom: Untyped - class geom_gen(rv_discrete): ... - -geom: Untyped - class hypergeom_gen(rv_discrete): ... - -hypergeom: Untyped - class nhypergeom_gen(rv_discrete): ... - -nhypergeom: Untyped - class logser_gen(rv_discrete): ... - -logser: Untyped - class poisson_gen(rv_discrete): ... - -poisson: Untyped - class planck_gen(rv_discrete): ... - -planck: Untyped - class boltzmann_gen(rv_discrete): ... - -boltzmann: Untyped - class randint_gen(rv_discrete): ... - -randint: Untyped - class zipf_gen(rv_discrete): ... - -zipf: Untyped - class zipfian_gen(rv_discrete): ... - -zipfian: Untyped - class dlaplace_gen(rv_discrete): ... - -dlaplace: Untyped - class skellam_gen(rv_discrete): ... - -skellam: Untyped - class yulesimon_gen(rv_discrete): ... - -yulesimon: Untyped - -class _nchypergeom_gen(rv_discrete): - rvs_name: Untyped - dist: Untyped - -class nchypergeom_fisher_gen(_nchypergeom_gen): - rvs_name: str - dist: Untyped - -nchypergeom_fisher: Untyped - -class nchypergeom_wallenius_gen(_nchypergeom_gen): - rvs_name: str - dist: Untyped - -nchypergeom_wallenius: Untyped -pairs: Untyped +class _nchypergeom_gen(rv_discrete): ... +class nchypergeom_fisher_gen(_nchypergeom_gen): ... +class nchypergeom_wallenius_gen(_nchypergeom_gen): ... + +binom: Final[binom_gen] +bernoulli: Final[bernoulli_gen] +betabinom: Final[betabinom_gen] +nbinom: Final[nbinom_gen] +betanbinom: Final[betanbinom_gen] +geom: Final[geom_gen] +hypergeom: Final[hypergeom_gen] +nhypergeom: Final[nhypergeom_gen] +logser: Final[logser_gen] +poisson: Final[poisson_gen] +planck: Final[planck_gen] +boltzmann: Final[boltzmann_gen] +randint: Final[randint_gen] +zipf: Final[zipf_gen] +zipfian: Final[zipfian_gen] +dlaplace: Final[dlaplace_gen] +skellam: Final[skellam_gen] +yulesimon: Final[yulesimon_gen] +nchypergeom_fisher: Final[nchypergeom_fisher_gen] +nchypergeom_wallenius: Final[nchypergeom_wallenius_gen]