Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👽️ stats: 1.15.0 new distribution infrastructure #360

Merged
merged 16 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .mypyignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ scipy\.(_lib|integrate|stats)\.((_|\w)+\.)+__replace__ # `NamedTuple` on `pytho
# stubtest doesn't understand `if sys.version_info >= _: ...` blocks
scipy\.sparse\.(\w+)\.warn

# annoying and useless __new__
scipy\.stats\.(_new_distributions\.)?Normal\.__new__

# mypy fails recognize type-check-only ufunc subtypes as ufuncs
# https://github.com/KotlinIsland/basedmypy/issues/816
scipy\.special\._basic\.digamma
Expand Down
5 changes: 0 additions & 5 deletions .mypyignore-todo

This file was deleted.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ uv run --frozen --no-editable --isolated --refresh-package=scipy-stubs
stubtest
--mypy-config-file=pyproject.toml
--allowlist=.mypyignore
--allowlist=.mypyignore-todo
--ignore-unused-allowlist
$modules
"""
Expand Down
20 changes: 11 additions & 9 deletions scipy-stubs/stats/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ from ._bws_test import bws_test
from ._censored_data import CensoredData
from ._correlation import chatterjeexi
from ._covariance import Covariance
from ._distribution_infrastructure import Mixture, abs, exp, log, make_distribution, order_statistic, truncate
from ._entropy import differential_entropy, entropy
from ._fit import fit, goodness_of_fit
from ._hypotests import (
Expand Down Expand Up @@ -72,6 +73,7 @@ from ._multivariate import (
vonmises_fisher,
wishart,
)
from ._new_distributions import Normal, Uniform
from ._page_trend_test import page_trend_test
from ._resampling import (
BootstrapMethod,
Expand Down Expand Up @@ -302,9 +304,13 @@ __all__ = [
"Covariance",
"DegenerateDataWarning",
"FitError",
"Mixture",
"MonteCarloMethod",
"NearConstantInputWarning",
"Normal",
"PermutationMethod",
"Uniform",
"abs",
"alexandergovern",
"alpha",
"anderson",
Expand Down Expand Up @@ -371,6 +377,7 @@ __all__ = [
"entropy",
"epps_singleton_2samp",
"erlang",
"exp",
"expectile",
"expon",
"exponnorm",
Expand Down Expand Up @@ -450,6 +457,7 @@ __all__ = [
"levy_stable",
"linregress",
"lmoment",
"log",
"loggamma",
"logistic",
"loglaplace",
Expand All @@ -458,6 +466,7 @@ __all__ = [
"logser",
"loguniform",
"lomax",
"make_distribution",
"mannwhitneyu",
"matrix_normal",
"maxwell",
Expand Down Expand Up @@ -493,6 +502,7 @@ __all__ = [
"normaltest",
"norminvgauss",
"obrientransform",
"order_statistic",
"ortho_group",
"page_trend_test",
"pareto",
Expand Down Expand Up @@ -560,6 +570,7 @@ __all__ = [
"trim1",
"trim_mean",
"trimboth",
"truncate",
"truncexpon",
"truncnorm",
"truncpareto",
Expand Down Expand Up @@ -598,13 +609,4 @@ __all__ = [
"zipfian",
"zmap",
"zscore",
# "Mixture",
# "Normal",
# "Uniform",
# "abs",
# "exp",
# "log",
# "make_distribution",
# "order_statistic",
# "truncate",
]
Loading
Loading