diff --git a/scipy-stubs/stats/_multivariate.pyi b/scipy-stubs/stats/_multivariate.pyi index 27c77fe2..0f7ed6d0 100644 --- a/scipy-stubs/stats/_multivariate.pyi +++ b/scipy-stubs/stats/_multivariate.pyi @@ -10,7 +10,6 @@ import optype.numpy as onpt import scipy._typing as spt from scipy.stats import _covariance from ._covariance import Covariance -from ._distn_infrastructure import _RNG, _Seed __all__ = [ "dirichlet", @@ -57,13 +56,13 @@ _AnyCov: TypeAlias = Covariance | _ArrayLike_uif_2d | spt.AnyReal @type_check_only class rng_mixin: @property - def random_state(self, /) -> _RNG: ... + def random_state(self, /) -> spt.RNG: ... @random_state.setter - def random_state(self, /, seed: _Seed) -> None: ... + def random_state(self, /, seed: spt.Seed) -> None: ... class multi_rv_generic(rng_mixin): - def __init__(self, /, seed: _Seed | None = None) -> None: ... - def _get_random_state(self, /, random_state: _Seed) -> _RNG: ... + def __init__(self, /, seed: spt.Seed | None = None) -> None: ... + def _get_random_state(self, /, random_state: spt.Seed) -> spt.RNG: ... @abc.abstractmethod def __call__(self, /, *args: Any, **kwds: Any) -> multi_rv_frozen[Self]: ... @@ -79,7 +78,7 @@ class multivariate_normal_gen(multi_rv_generic): mean: _ArrayLike_uif_1d | None = None, cov: _AnyCov = 1, allow_singular: bool = False, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> multivariate_normal_frozen: ... def logpdf( self, @@ -129,7 +128,7 @@ class multivariate_normal_gen(multi_rv_generic): mean: _ArrayLike_uif_1d | None = None, cov: _AnyCov = 1, size: int | tuple[int, ...] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> npt.NDArray[np.float64]: ... def entropy(self, /, mean: _ArrayLike_uif_1d | None = None, cov: _AnyCov = 1) -> np.float64: ... def fit( @@ -152,7 +151,7 @@ class multivariate_normal_frozen(multi_rv_frozen[multivariate_normal_gen]): mean: _ArrayLike_uif_1d | None = None, cov: _AnyCov = 1, allow_singular: bool = False, - seed: _Seed | None = None, + seed: spt.Seed | None = None, maxpts: int | None = None, abseps: float = 1e-05, releps: float = 1e-05, @@ -177,7 +176,7 @@ class multivariate_normal_frozen(multi_rv_frozen[multivariate_normal_gen]): *, lower_limit: _ArrayLike_uif_1d | None = None, ) -> _ScalarOrArray_f8: ... - def rvs(self, /, size: int | tuple[int, ...] = 1, random_state: _Seed | None = None) -> npt.NDArray[np.float64]: ... + def rvs(self, /, size: int | tuple[int, ...] = 1, random_state: spt.Seed | None = None) -> npt.NDArray[np.float64]: ... def entropy(self, /) -> np.float64: ... class matrix_normal_gen(multi_rv_generic): @@ -188,7 +187,7 @@ class matrix_normal_gen(multi_rv_generic): mean: _ArrayLike_uif_2d | None = None, rowcov: _ArrayLike_uif_2d | spt.AnyReal = 1, colcov: _ArrayLike_uif_2d | spt.AnyReal = 1, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> matrix_normal_frozen: ... def logpdf( self, @@ -213,7 +212,7 @@ class matrix_normal_gen(multi_rv_generic): rowcov: _ArrayLike_uif_2d | spt.AnyReal = 1, colcov: _ArrayLike_uif_2d | spt.AnyReal = 1, size: op.typing.AnyInt = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... def entropy(self, /, rowcov: _AnyCov = 1, colcov: _AnyCov = 1) -> np.float64: ... @@ -225,7 +224,7 @@ class matrix_normal_frozen(multi_rv_frozen[matrix_normal_gen]): mean: _ArrayLike_uif_2d | None = None, rowcov: _ArrayLike_uif_2d | spt.AnyReal = 1, colcov: _ArrayLike_uif_2d | spt.AnyReal = 1, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... @@ -233,13 +232,13 @@ class matrix_normal_frozen(multi_rv_frozen[matrix_normal_gen]): self, /, size: op.typing.AnyInt = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... def entropy(self, /) -> np.float64: ... class dirichlet_gen(multi_rv_generic): @override - def __call__(self, /, alpha: _ArrayLike_uif_1d, seed: _Seed | None = None) -> dirichlet_frozen: ... + def __call__(self, /, alpha: _ArrayLike_uif_1d, seed: spt.Seed | None = None) -> dirichlet_frozen: ... def logpdf(self, /, x: _ArrayLike_uif_nd, alpha: _ArrayLike_uif_1d) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd, alpha: _ArrayLike_uif_1d) -> _ScalarOrArray_f8: ... def mean(self, /, alpha: _ArrayLike_uif_1d) -> onpt.Array[tuple[int], np.float64]: ... @@ -252,7 +251,7 @@ class dirichlet_gen(multi_rv_generic): /, alpha: _ArrayLike_uif_1d, size: tuple[()], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int], np.float64]: ... @overload def rvs( @@ -260,7 +259,7 @@ class dirichlet_gen(multi_rv_generic): /, alpha: _ArrayLike_uif_1d, size: int | tuple[int] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int], np.float64]: ... @overload def rvs( @@ -268,7 +267,7 @@ class dirichlet_gen(multi_rv_generic): /, alpha: _ArrayLike_uif_1d, size: tuple[int, int], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... @overload def rvs( @@ -276,12 +275,12 @@ class dirichlet_gen(multi_rv_generic): /, alpha: _ArrayLike_uif_1d, size: onpt.AtLeast2D, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... class dirichlet_frozen(multi_rv_frozen[dirichlet_gen]): alpha: Final[onpt.Array[tuple[int], _Scalar_uif]] - def __init__(self, /, alpha: _ArrayLike_uif_1d, seed: _Seed | None = None) -> None: ... + def __init__(self, /, alpha: _ArrayLike_uif_1d, seed: spt.Seed | None = None) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> onpt.Array[tuple[int], np.float64]: ... @@ -289,23 +288,23 @@ class dirichlet_frozen(multi_rv_frozen[dirichlet_gen]): def cov(self, /) -> onpt.Array[tuple[int, int], np.float64]: ... def entropy(self, /) -> np.float64: ... @overload - def rvs(self, /, size: tuple[()], random_state: _Seed | None = None) -> onpt.Array[tuple[int], np.float64]: ... + def rvs(self, /, size: tuple[()], random_state: spt.Seed | None = None) -> onpt.Array[tuple[int], np.float64]: ... @overload def rvs( self, /, size: int | tuple[int] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int], np.float64]: ... @overload def rvs( self, /, size: tuple[int, int], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... @overload - def rvs(self, /, size: onpt.AtLeast2D, random_state: _Seed | None = None) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... + def rvs(self, /, size: onpt.AtLeast2D, random_state: spt.Seed | None = None) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... class wishart_gen(multi_rv_generic): @override @@ -314,7 +313,7 @@ class wishart_gen(multi_rv_generic): /, df: spt.AnyReal | None = None, scale: _ArrayLike_uif_2d_max | None = None, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> wishart_frozen: ... def logpdf( self, @@ -339,7 +338,7 @@ class wishart_gen(multi_rv_generic): df: spt.AnyReal, scale: _ArrayLike_uif_2d_max, size: int | tuple[int, ...] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> _ScalarOrArray_f8: ... def entropy(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64: ... @@ -349,7 +348,7 @@ class wishart_frozen(multi_rv_frozen[wishart_gen]): scale: Final[onpt.Array[tuple[int, int], np.float64]] C: Final[onpt.Array[tuple[int, int], np.float64]] log_det_scale: Final[float] - def __init__(self, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max, seed: _Seed | None = None) -> None: ... + def __init__(self, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max, seed: spt.Seed | None = None) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> np.float64 | onpt.Array[tuple[int, int], np.float64]: ... @@ -359,40 +358,40 @@ class wishart_frozen(multi_rv_frozen[wishart_gen]): self, /, size: int | onpt.AtLeast1D = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> _ScalarOrArray_f8: ... def entropy(self, /) -> np.float64: ... class invwishart_gen(wishart_gen): @override - def __call__( # type: ignore[override] + def __call__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, /, df: spt.AnyReal | None = None, scale: _ArrayLike_uif_2d_max | None = None, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> invwishart_frozen: ... @override - def mean(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | None: ... # type: ignore[override] + def mean(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override - def mode(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | onpt.Array[tuple[int, int], np.float64]: ... # type: ignore[override] + def mode(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | onpt.Array[tuple[int, int], np.float64]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override - def var(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | None: ... # type: ignore[override] + def var(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max) -> np.float64 | None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] class invwishart_frozen(multi_rv_frozen[invwishart_gen]): - def __init__(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max, seed: _Seed | None = None) -> None: ... + def __init__(self, /, df: spt.AnyReal, scale: _ArrayLike_uif_2d_max, seed: spt.Seed | None = None) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> np.float64 | onpt.Array[tuple[int, int], np.float64]: ... def mode(self, /) -> np.float64 | None: ... def var(self, /) -> np.float64 | onpt.Array[tuple[int, int], np.float64]: ... - def rvs(self, /, size: int | tuple[int, ...] = 1, random_state: _Seed | None = None) -> npt.NDArray[np.float64]: ... + def rvs(self, /, size: int | tuple[int, ...] = 1, random_state: spt.Seed | None = None) -> npt.NDArray[np.float64]: ... def entropy(self, /) -> np.float64: ... # NOTE: `n` and `p` are broadcast-able (although this breaks `.rvs()` at runtime...) class multinomial_gen(multi_rv_generic): @override - def __call__(self, /, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, seed: _Seed | None = None) -> multinomial_frozen: ... + def __call__(self, /, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, seed: spt.Seed | None = None) -> multinomial_frozen: ... def logpmf(self, /, x: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd) -> _ScalarOrArray_f8: ... def mean(self, /, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... @@ -405,7 +404,7 @@ class multinomial_gen(multi_rv_generic): n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, size: tuple[()], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast1D]: ... @overload def rvs( @@ -414,43 +413,43 @@ class multinomial_gen(multi_rv_generic): n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, size: int | onpt.AtLeast1D | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D]: ... # TODO: make generic on the (output) shape-type, i.e. to capture the broadcasting effects (use `TypeVar` with default) class multinomial_frozen(multi_rv_frozen[multinomial_gen]): - def __init__(self, /, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, seed: _Seed | None = None) -> None: ... + def __init__(self, /, n: onpt.AnyIntegerArray, p: _ArrayLike_f_nd, seed: spt.Seed | None = None) -> None: ... def logpmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... def cov(self, /) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... def entropy(self, /) -> _ScalarOrArray_f8: ... @overload - def rvs(self, /, size: tuple[()], random_state: _Seed | None = None) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... + def rvs(self, /, size: tuple[()], random_state: spt.Seed | None = None) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... @overload def rvs( self, /, size: onpt.AtLeast1D | int = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... @type_check_only class _group_rv_gen_mixin(Generic[_RVF_co]): - def __call__(self, /, dim: spt.AnyInt | None = None, seed: _Seed | None = None) -> _RVF_co: ... + def __call__(self, /, dim: spt.AnyInt | None = None, seed: spt.Seed | None = None) -> _RVF_co: ... def rvs( self, /, dim: spt.AnyInt, size: int = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... @type_check_only class _group_rv_frozen_mixin: dim: spt.AnyInt - def __init__(self, /, dim: spt.AnyInt | None = None, seed: _Seed | None = None) -> None: ... - def rvs(self, /, size: int = 1, random_state: _Seed | None = None) -> onpt.Array[tuple[int, int, int], np.float64]: ... + def __init__(self, /, dim: spt.AnyInt | None = None, seed: spt.Seed | None = None) -> None: ... + def rvs(self, /, size: int = 1, random_state: spt.Seed | None = None) -> onpt.Array[tuple[int, int, int], np.float64]: ... class special_ortho_group_gen(_group_rv_gen_mixin[special_ortho_group_frozen], multi_rv_generic): ... class special_ortho_group_frozen(_group_rv_frozen_mixin, multi_rv_frozen[special_ortho_group_gen]): ... @@ -469,7 +468,7 @@ class random_correlation_gen(multi_rv_generic): self, /, eigs: _ArrayLike_uif_1d, - seed: _Seed | None = None, + seed: spt.Seed | None = None, tol: float = 1e-13, diag_tol: float = 1e-07, ) -> random_correlation_frozen: ... @@ -477,7 +476,7 @@ class random_correlation_gen(multi_rv_generic): self, /, eigs: _ArrayLike_uif_1d, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, tol: float = 1e-13, diag_tol: float = 1e-07, ) -> npt.NDArray[np.float64]: ... @@ -490,11 +489,11 @@ class random_correlation_frozen(multi_rv_frozen[random_correlation_gen]): self, /, eigs: _ArrayLike_uif_1d, - seed: _Seed | None = None, + seed: spt.Seed | None = None, tol: float = 1e-13, diag_tol: float = 1e-07, ) -> None: ... - def rvs(self, /, random_state: _Seed | None = None) -> npt.NDArray[np.float64]: ... + def rvs(self, /, random_state: spt.Seed | None = None) -> npt.NDArray[np.float64]: ... class multivariate_t_gen(multi_rv_generic): @override @@ -505,7 +504,7 @@ class multivariate_t_gen(multi_rv_generic): shape: spt.AnyReal | _ArrayLike_uif_2d = 1, df: int = 1, allow_singular: bool = False, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> multivariate_t_frozen: ... def pdf( self, @@ -535,7 +534,7 @@ class multivariate_t_gen(multi_rv_generic): *, maxpts: int | None = None, lower_limit: _ArrayLike_uif_1d | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> _ScalarOrArray_f8: ... def entropy( self, @@ -553,7 +552,7 @@ class multivariate_t_gen(multi_rv_generic): df: int = 1, *, size: tuple[()], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int], np.float64]: ... @overload def rvs( @@ -563,7 +562,7 @@ class multivariate_t_gen(multi_rv_generic): df: int, /, size: tuple[()], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int], np.float64]: ... @overload def rvs( @@ -573,7 +572,7 @@ class multivariate_t_gen(multi_rv_generic): shape: spt.AnyReal | _ArrayLike_uif_2d = 1, df: int = 1, size: int | tuple[int] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int], np.float64]: ... @overload def rvs( @@ -584,7 +583,7 @@ class multivariate_t_gen(multi_rv_generic): df: int = 1, *, size: onpt.AtLeast2D, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... @overload def rvs( @@ -594,7 +593,7 @@ class multivariate_t_gen(multi_rv_generic): df: int, /, size: onpt.AtLeast2D, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... class multivariate_t_frozen(multi_rv_frozen[multivariate_t_gen]): @@ -610,7 +609,7 @@ class multivariate_t_frozen(multi_rv_frozen[multivariate_t_gen]): shape: spt.AnyReal | _ArrayLike_uif_2d = 1, df: int = 1, allow_singular: bool = False, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... @@ -621,20 +620,20 @@ class multivariate_t_frozen(multi_rv_frozen[multivariate_t_gen]): *, maxpts: int | None = None, lower_limit: _ArrayLike_uif_1d | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> _ScalarOrArray_f8: ... def entropy(self, /) -> np.float64: ... @overload - def rvs(self, /, size: tuple[()], random_state: _Seed | None = None) -> onpt.Array[tuple[int], np.float64]: ... + def rvs(self, /, size: tuple[()], random_state: spt.Seed | None = None) -> onpt.Array[tuple[int], np.float64]: ... @overload def rvs( self, /, size: int | tuple[int] = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int], np.float64]: ... @overload - def rvs(self, /, size: onpt.AtLeast2D, random_state: _Seed | None = None) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... + def rvs(self, /, size: onpt.AtLeast2D, random_state: spt.Seed | None = None) -> onpt.Array[onpt.AtLeast3D, np.float64]: ... # NOTE: `m` and `n` are broadcastable (but doing so will break `.rvs()` at runtime...) class multivariate_hypergeom_gen(multi_rv_generic): @@ -644,7 +643,7 @@ class multivariate_hypergeom_gen(multi_rv_generic): /, m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> multivariate_hypergeom_frozen: ... def logpmf(self, /, x: _ArrayLike_uif_nd, m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd, m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... @@ -658,7 +657,7 @@ class multivariate_hypergeom_gen(multi_rv_generic): m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd, size: tuple[()], - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... @overload def rvs( @@ -667,32 +666,39 @@ class multivariate_hypergeom_gen(multi_rv_generic): m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd, size: int | onpt.AtLeast1D | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... # TODO: make generic with a shape type-param (with default) to capture the broadcasting effects class multivariate_hypergeom_frozen(multi_rv_frozen[multivariate_hypergeom_gen]): - def __init__(self, /, m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd, seed: _Seed | None = None) -> None: ... + def __init__(self, /, m: _ArrayLike_ui_nd, n: int | _ArrayLike_ui_nd, seed: spt.Seed | None = None) -> None: ... def logpmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... def var(self, /) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... def cov(self, /) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... @overload - def rvs(self, /, size: tuple[()], random_state: _Seed | None = None) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... + def rvs(self, /, size: tuple[()], random_state: spt.Seed | None = None) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... @overload def rvs( self, /, size: int | onpt.AtLeast1D = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... _RandomTableRVSMethod: TypeAlias = Literal["boyett", "patefield"] class random_table_gen(multi_rv_generic): @override - def __call__(self, /, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd, *, seed: _Seed | None = None) -> random_table_frozen: ... + def __call__( + self, + /, + row: _ArrayLike_ui_nd, + col: _ArrayLike_ui_nd, + *, + seed: spt.Seed | None = None, + ) -> random_table_frozen: ... def logpmf(self, /, x: _ArrayLike_uif_nd, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... def mean(self, /, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd) -> onpt.Array[tuple[int, int], np.float64]: ... @@ -704,11 +710,11 @@ class random_table_gen(multi_rv_generic): *, size: int | None = None, method: _RandomTableRVSMethod | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... class random_table_frozen(multi_rv_frozen[random_table_gen]): - def __init__(self, /, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd, *, seed: _Seed | None = None) -> None: ... + def __init__(self, /, row: _ArrayLike_ui_nd, col: _ArrayLike_ui_nd, *, seed: spt.Seed | None = None) -> None: ... def logpmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> onpt.Array[tuple[int, int], np.float64]: ... @@ -717,7 +723,7 @@ class random_table_frozen(multi_rv_frozen[random_table_gen]): /, size: int | None = None, method: _RandomTableRVSMethod | None = None, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[tuple[int, int, int], np.float64]: ... class dirichlet_multinomial_gen(multi_rv_generic): @@ -727,7 +733,7 @@ class dirichlet_multinomial_gen(multi_rv_generic): /, alpha: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> dirichlet_multinomial_frozen: ... def logpmf(self, /, x: _ArrayLike_ui_nd, alpha: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_ui_nd, alpha: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray) -> _ScalarOrArray_f8: ... @@ -739,7 +745,7 @@ class dirichlet_multinomial_gen(multi_rv_generic): class dirichlet_multinomial_frozen(multi_rv_frozen[dirichlet_multinomial_gen]): alpha: onpt.Array[onpt.AtLeast1D, np.float64] n: onpt.Array[onpt.AtLeast1D, np.int_] # broadcasted against alpha - def __init__(self, /, alpha: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray, seed: _Seed | None = None) -> None: ... + def __init__(self, /, alpha: _ArrayLike_uif_nd, n: onpt.AnyIntegerArray, seed: spt.Seed | None = None) -> None: ... def logpmf(self, /, x: _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... def pmf(self, /, x: _ArrayLike_ui_nd) -> _ScalarOrArray_f8: ... def mean(self, /) -> onpt.Array[onpt.AtLeast1D, np.float64]: ... @@ -753,7 +759,7 @@ class vonmises_fisher_gen(multi_rv_generic): /, mu: _ArrayLike_uif_1d | None = None, kappa: int = 1, - seed: _Seed | None = None, + seed: spt.Seed | None = None, ) -> vonmises_fisher_frozen: ... def logpdf(self, /, x: _ArrayLike_uif_nd, mu: _ArrayLike_uif_1d | None = None, kappa: int = 1) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd, mu: _ArrayLike_uif_1d | None = None, kappa: int = 1) -> _ScalarOrArray_f8: ... @@ -764,12 +770,12 @@ class vonmises_fisher_gen(multi_rv_generic): mu: _ArrayLike_uif_1d | None = None, kappa: int = 1, size: int | onpt.AtLeast1D = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... def fit(self, /, x: _ArrayLike_uif_nd) -> tuple[onpt.Array[tuple[int], np.float64], float]: ... class vonmises_fisher_frozen(multi_rv_frozen[vonmises_fisher_gen]): - def __init__(self, /, mu: _ArrayLike_uif_1d | None = None, kappa: int = 1, seed: _Seed | None = None) -> None: ... + def __init__(self, /, mu: _ArrayLike_uif_1d | None = None, kappa: int = 1, seed: spt.Seed | None = None) -> None: ... def logpdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def pdf(self, /, x: _ArrayLike_uif_nd) -> _ScalarOrArray_f8: ... def entropy(self, /) -> np.float64: ... @@ -777,7 +783,7 @@ class vonmises_fisher_frozen(multi_rv_frozen[vonmises_fisher_gen]): self, /, size: int | onpt.AtLeast1D = 1, - random_state: _Seed | None = None, + random_state: spt.Seed | None = None, ) -> onpt.Array[onpt.AtLeast2D, np.float64]: ... multivariate_normal: Final[multivariate_normal_gen]