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

ENH: stats: add random variable infrastructure #110

Closed
wants to merge 201 commits into from
Closed
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
07b7286
ENH: stats: add random variable infrastructure
mdhaber Sep 24, 2023
54d4375
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Jan 23, 2024
78ec647
Fixup infinite support handling of _tanhsinh, add notebook
mdhaber Feb 1, 2024
2ebc84f
MAINT: improve dtypes and shapes
mdhaber Feb 5, 2024
f87dd3d
Improve notebook
mdhaber Feb 14, 2024
6972fa2
TST: test shape, dtype, and nan-pattern of support
mdhaber Feb 5, 2024
5de2fb2
MAINT: remove incorrect use of cached_property
mdhaber Feb 5, 2024
3686008
ENH: rethink fit method
mdhaber Feb 28, 2024
ed6efb1
DOC: fit method example
mdhaber Mar 9, 2024
779ae3d
MAINT: rename variance/standard_deviation, make properties, improve docs
mdhaber Mar 10, 2024
a3854ab
DOC: add docstring to logentropy; fix std->standard_deviation
mdhaber Mar 10, 2024
bfc3a08
DOC: improve documentation
mdhaber Mar 10, 2024
916e84d
DOC: fix doctests
mdhaber Mar 11, 2024
d6cf5eb
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Mar 31, 2024
9826f2e
MAINT: stats: give Normal shape parameters
mdhaber Mar 31, 2024
72a3802
Loosen integration tolerance
mdhaber Mar 31, 2024
dd32dcf
MAINT: stats: consolidate `moment` function
mdhaber Apr 1, 2024
5f613cc
MAINT: stats: remove kwarg 'cache_policy' of public methods
mdhaber Apr 1, 2024
29b61a4
DOC: stats.ContinuousDistribution: add documentation
mdhaber Apr 1, 2024
87902e1
DOC: stats.ContinuousDistribution: doc improvements
mdhaber Apr 1, 2024
c3fe500
DOC: stats.ContinuousDistribution: replace and expand examples; add d…
mdhaber Apr 1, 2024
c955a7a
DOC: stats.ContinuousDistribution: document entropy/logentropy, fix PEP8
mdhaber Apr 1, 2024
84cc3e4
DOC: stats.ContinuousDistribution: document support method
mdhaber Apr 1, 2024
2fdeff4
DOC: stats.ContinuousDistribution: document moment methods
mdhaber Apr 2, 2024
a8e5179
DOC: stats.ContinuousDistribution: document median and mode
mdhaber Apr 2, 2024
b8efd47
DOC: stats.ContinuousDistribution: refinements
mdhaber Apr 2, 2024
6d5efe2
DOC: stats.ContinuousDistribution: document sample method
mdhaber Apr 2, 2024
270638f
DOC: stats.ContinuousDistribution: appease Sphinx
mdhaber Apr 2, 2024
8c788cb
ENH: stats.ContinuousDistribution: rewrite plot method
mdhaber Apr 3, 2024
5a8bd81
ENH: stats.ContinuousDistribution: improve plot
mdhaber Apr 3, 2024
ea28e37
ENH: stats.ContinuousDistribution.fit: draft for real
mdhaber Apr 4, 2024
1c4eeb8
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Apr 12, 2024
5ee1b1f
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Apr 15, 2024
0061c24
DOC: stats.rv_infrastructure: respond to most comments
mdhaber Apr 15, 2024
98ea3c8
DOC: stats.rv_infrastructure: concise links to methods
mdhaber Apr 16, 2024
d6dbed0
DOC: stast.rv_infrastructure: end one-line summaries with periods
mdhaber Apr 16, 2024
9009bc9
DOC: stats.rv_infrastructure: fix broken example
mdhaber Apr 16, 2024
0e5d5e4
MAINT: stats.rv_infrastructure: 'complementarity'->'complement'
mdhaber Apr 16, 2024
508d157
DOC: stats.rv_continuous: add documentation to loggy methods
mdhaber Apr 16, 2024
029a8c7
DOC: stats.rv_infrastructure: change Array -> array
mdhaber Apr 16, 2024
55e9e4c
DOC: stats.rv_infrastructure: revise definition of arguments of pdf/l…
mdhaber Apr 16, 2024
45bbd96
DOC: stats.rv_infrastructure: define 'logarithmic complement'
mdhaber Apr 16, 2024
3cbc267
DOC: stats.rv_infrastructure: add references, document llf
mdhaber Apr 16, 2024
0e07b79
MAINT: stats.rv_infrastructure: make update_parameters private, impro…
mdhaber Apr 16, 2024
be01ed1
DOC: stats.rv_infrastructure: change argument names x -> p / logp
mdhaber Apr 17, 2024
be06459
MAINT: stats.rv_infrastructure: add reminder
mdhaber Apr 17, 2024
2c16794
DOC: stats.rv_infrastructure: many corrections/improvements
mdhaber Apr 18, 2024
bd9867a
MAINT: improve `fit` and much more
mdhaber Apr 18, 2024
a60d3d3
ENH: stats.rv_infrastructure: IDE keyword suggestions, default Normal…
mdhaber Apr 19, 2024
4b84a9d
DOC: stats.rv_continuous: fix typo, remove old comment
mdhaber Apr 19, 2024
c8a1ef4
DOC: stats.rv_continuous: wordsmithing
mdhaber Apr 19, 2024
3d216f0
MAINT: stats.rv_infrastructure: improve mode with _bracket_minimum
mdhaber Apr 20, 2024
cbd9e4e
TST: stats.ContinuousDistribution: test kurtosis IV
mdhaber Apr 20, 2024
48db583
MAINT: stats.ContinuousDistribution: fix one of several draw shortcom…
mdhaber Apr 20, 2024
49c38a6
MAINT: stats.ContinuousDistribution: just saving a few things before …
mdhaber Apr 20, 2024
d036c2d
MAINT: stats.ContinuousDistribution: improve notebook
mdhaber Apr 22, 2024
6d27924
MAINT: stats.ContinuousDistribution: clip CDF results
mdhaber Apr 22, 2024
9a83147
STY: stats.ContinuousDistribution: edit comments
mdhaber Apr 22, 2024
71158b5
MAINT: stats.ContinuousDistribution: simplify iv_policy
mdhaber Apr 22, 2024
a6ba4f5
MAINT: stats.ContinuousDistribution: use tol, simplify cache_policy
mdhaber Apr 22, 2024
09a8b08
MAINT: stats.ContinuousDistribution: rename kwargs -> params checkpoint
mdhaber Apr 22, 2024
b8638b5
MAINT: stats.ContinuousDistribution: rename kwargs -> params II
mdhaber Apr 22, 2024
e68ff38
MAINT: finish renaming kwargs->params
mdhaber Apr 23, 2024
dbb7d12
TST: stats.ContinuousDistribution: basic tol tests
mdhaber Apr 23, 2024
967c8f5
MAINT: stats.Normal: fix __new__
mdhaber Apr 23, 2024
97d5a83
TST: stats.ContinuousDistribution: improve test coverage
mdhaber Apr 23, 2024
9cb9d1d
MAINT: stats.ContinousDistribution: improve starting bracket
mdhaber Apr 23, 2024
d1aafb7
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Apr 25, 2024
4f7fb41
MAINT: stats.ContinuousDistribution: use _chandrupatla_minimum in mod…
mdhaber Apr 25, 2024
159d927
DOC: stats.ContinuousDistribution: generate static docs
mdhaber Apr 25, 2024
2725f45
MAINT: stats.ContinuousDistribution: lower-precision RNG generation, …
mdhaber Apr 26, 2024
34ccfef
Apply suggestions from code review
mdhaber Apr 27, 2024
93a7f47
ENH: stats.ShiftedScaledDistribution: add two-arg distribution functi…
mdhaber Apr 30, 2024
e711c67
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Apr 30, 2024
8f66bd6
MAINT: stats.ContinuousDistribution: update notebook
mdhaber Apr 30, 2024
29543a9
DOC: stats.ContinuousDistribution: correct Uniform/LogUniform doc ren…
mdhaber Apr 30, 2024
e2e1940
ENH: add dtype validation on sparse array/matrix creation.
May 20, 2024
808c82b
ENH: change warning message on validation
May 20, 2024
c3d0eac
Support pydata/sparse for norm and lsqr
mtsokol May 21, 2024
035978d
update grayscale morphology docstrings to make the behavior of struct…
grlee77 May 26, 2024
96be315
TST: optimize.differential_evolution: add fail-slow exception
mdhaber May 28, 2024
2842926
DOC: integrate: odeint user functions must not modify y. (#20815)
WarrenWeckesser May 28, 2024
1308b58
Merge pull request #20814 from mdhaber/gh20806
andyfaff May 28, 2024
8593006
MAINT: stats: make reducing functions emit consistent warning when sa…
mdhaber May 28, 2024
5382a02
MAINT: stats.linregress: remove out of _stats_mstats_common
mdhaber May 25, 2024
37de595
DEP: stats.linregress: deprecate one-arg use
mdhaber May 25, 2024
1ecd8df
Merge pull request #20789 from mdhaber/linregress_onearg
h-vetinari May 28, 2024
ed65b67
MAINT: optimize.isotonic_regression: remove unnecessary copies (#20582)
lorentzenchr May 28, 2024
69cd453
ENH: spatial: serialize concurrent calls to QHull (#20619)
andfoy May 28, 2024
d474026
CI/BLD: use scipy-openblas wheel when building (#20585)
mattip May 28, 2024
6e393bc
ENH: sparse.linalg: speed up `spsolve_triangular` (#17924)
maxaehle May 28, 2024
b05493a
REV: revert `cobyqa` submodule update in gh-17924 (#20819)
lucascolley May 28, 2024
ab78f18
TST: optimize.dual_annealing: add fail_slow exception missing from or…
mdhaber May 28, 2024
c1c3738
Merge pull request #20824 from mdhaber/test_dual_annealing_time_excep…
mdhaber May 28, 2024
c2be1a4
Merge pull request #20799 from grlee77/ndimage-improve-structure-docu…
rgommers May 28, 2024
1326c6a
REL: set version to 1.15.0.dev0
tylerjereddy May 28, 2024
05207a8
BUG: sparse: Fix argmin/max shape diff between axis 0/1. And min/max …
dschult May 28, 2024
3669cef
DOC: SciPy 1.14.0 relnotes
tylerjereddy May 24, 2024
c9ae6f6
Merge pull request #20784 from tylerjereddy/treddy_114_relnotes
tylerjereddy May 28, 2024
834c3bc
Merge pull request #20827 from tylerjereddy/treddy_115_prep
tylerjereddy May 28, 2024
74c13e4
BUG: sparse.csgraph, array types: support non-zero `fill_value`s (#20…
mtsokol May 29, 2024
cd8ba6f
Update _differentialevolution.py
voibit May 29, 2024
bff0bd0
MAINT: special: Fix typo in four_gammas used by hyp2f1 (#20829)
fancidev May 29, 2024
f5c5477
BUG: interpolate: make BSpline.integrate always return an array
ev-br May 29, 2024
dfbbc33
CI: Add Linux workflow to test on free-threaded Python builds (#20822)
andfoy May 30, 2024
63b1115
Merge pull request #20833 from ev-br/bspline_integrate_0D
tupui May 30, 2024
d7bab75
ENH: special.rel_entr: Avoid overflow before computing log (#20816)
nickodell May 30, 2024
7ae3d49
DEV: Add const in function signatures
czgdp1807 May 30, 2024
3535b37
BLD: Warning fix from ``scipy/special/special/gamma.h`` (#20820)
czgdp1807 May 30, 2024
d443759
Merge pull request #20837 from czgdp1807/_lib_pyx
rgommers May 30, 2024
1ead6a9
MAINT: stats._axis_nan_policy: fix `keepdims` when result objects hav…
sdiebolt May 31, 2024
82d9b63
DEP: deprecate trapz alias of `stats.trapezoid` distribution (#20828)
h-vetinari May 31, 2024
4759208
DOC: add cobyqa website reference (#20841)
andyfaff May 31, 2024
5d15fdb
DOC: Wrap long titles in docs pages
melissawm May 31, 2024
389127d
Merge pull request #20846 from melissawm/wrap-titles
tupui May 31, 2024
f54f7d5
BUG: integrate: make `select_initial_step` aware of integration inter…
valentineap May 31, 2024
964458d
DOC: mention -b option in testing doc.
fancidev May 31, 2024
ba7644b
DOC/DEV: mention `-b` option in contributor guide on testing (#20849)
lucascolley Jun 1, 2024
dd836d0
TST: fail_slow bumps to add margin
mdhaber Jun 1, 2024
1f81337
MAINT: stats.bootstrap: FutureWarning about broadcasting
mdhaber Jun 2, 2024
78a67fc
Merge pull request #20855 from mdhaber/fail_slow_updates
rgommers Jun 2, 2024
5ad23a9
DEP: stats: remove `rvs_ratio_uniforms`
j-bowhay Jun 2, 2024
850171a
DEP: signal: remove wavelet functions
j-bowhay Jun 2, 2024
860ede0
DEP: integrate: remove quadrature and romberg
j-bowhay Jun 2, 2024
a38caca
DOC: remove reference to removed functions
j-bowhay Jun 3, 2024
fe9816c
DOC: remove reference to removed functions
j-bowhay Jun 3, 2024
83f8a1b
DOC: Update _differentialevolution.py [docs only]
andyfaff Jun 3, 2024
e567cf4
DOC: Update _differentialevolution.py [docs only]
andyfaff Jun 3, 2024
4944a8f
DOC: Update _differentialevolution.py
andyfaff Jun 3, 2024
2550014
DEP: signal: remove `cmplx_sort` (#20859)
j-bowhay Jun 3, 2024
1f286a6
DEV: Use const wherever possible
czgdp1807 Jun 3, 2024
82a1864
Merge pull request #20865 from j-bowhay/remove_wavlets
tupui Jun 3, 2024
10d2160
DEP: special.factorial: raise error for non-integer scalars and `exac…
j-bowhay Jun 3, 2024
05b9a2f
Merge pull request #20866 from j-bowhay/remove_rvs_ratios_uniform
tupui Jun 3, 2024
2d539eb
Merge pull request #20864 from j-bowhay/int_removal
tupui Jun 3, 2024
656f484
DEV: Use const wherever possible in scipy.sparse.csgraph
czgdp1807 Jun 3, 2024
85865e8
Skip csgraph non-zero fill-value tests for sparse < 0.15.4 (#20871)
mtsokol Jun 3, 2024
1d683b7
DEV: Use const wherever possible in spatial
czgdp1807 Jun 3, 2024
e262f3c
MAINT: special: Add kokkos `mdspan` (#20862)
izaid Jun 3, 2024
be9fd94
Merge pull request #20872 from czgdp1807/interpolate_pyx
ev-br Jun 3, 2024
9e50b78
DOC: use intersphinx_registry for easier intersphinx mapping maintena…
tupui Jun 3, 2024
162a176
MAINT: sparse: fix `__init__` func sig to allow `maxprint` to be set …
dschult Jun 3, 2024
c7558c2
Merge pull request #20874 from czgdp1807/spatial_pyx
rgommers Jun 3, 2024
d6530f3
Merge pull request #20873 from czgdp1807/csgraph_pyx
rgommers Jun 3, 2024
2348397
ENH: `stats.ttest_ind`: add array API support (#20771)
mdhaber Jun 3, 2024
dac3af6
Merge pull request #20830 from voibit/main
andyfaff Jun 4, 2024
028b5d6
ENH: sparse: add axis parameter to `count_nonzero` method (#20857)
dschult Jun 4, 2024
87dd6f8
DOC: mailing list to forum (#20881)
tupui Jun 4, 2024
f9b4962
DOC: stats.bootstrap: warning admonition -> versionchanged
mdhaber Jun 4, 2024
233a8bc
Merge pull request #20876 from tupui/interphinx_mapping
lucascolley Jun 4, 2024
d2b3067
DOC/DEV: add docs for enabling interactive examples (#20843)
steppi Jun 4, 2024
1abe5c1
MAINT: optimize.differential_evolution: add fail_slow exception
mdhaber Jun 4, 2024
0690159
ENH: stats: rewrite `ttest_rel` in terms of `ttest_1samp` (#20883)
j-bowhay Jun 4, 2024
fc02da5
DEP: interpolate: deprecate complex dtypes in `{Akima1D, Pchip}Interp…
j-bowhay Jun 4, 2024
dee9b09
BUG: fix incorrect intersphinx-registry entry in environment.yml
rgommers Jun 4, 2024
4c11b58
Merge pull request #20885 from rgommers/fix-environment-yml
lucascolley Jun 4, 2024
9c14869
DEV: Use const wherever possible in signal
czgdp1807 Jun 4, 2024
84042c7
DEV: Undo const usage for Windows CI
czgdp1807 Jun 4, 2024
74f896f
CI/DEV: fix Node.js 16 warnings by bumping actions (#20886)
lucascolley Jun 4, 2024
919f047
ENH: stats: end-to-end array-API support for NHSTs with beta null dis…
mdhaber Jun 4, 2024
5ffdd8b
DOC: Write API reference titles in monospace font
melissawm Jun 3, 2024
b12bc58
DEV: Use const wherever possible in stats
czgdp1807 Jun 4, 2024
2359b81
Merge pull request #20890 from melissawm/monospace-titles
tupui Jun 4, 2024
1fe14e0
Merge pull request #20858 from mdhaber/gh20850
tupui Jun 4, 2024
9d543ae
Merge pull request #20891 from czgdp1807/stats_pyx
tupui Jun 4, 2024
d070117
ENH: change Warning to ValueError
Jun 4, 2024
b536b40
FIX: removed unnecessary list construction
Jun 4, 2024
4f60de0
ENH: stats: end-to-end array-API support for NHSTs with Student's t n…
mdhaber Jun 4, 2024
f9182b7
Merge pull request #20754 from rmnigm/validate-dtype-sparse
dschult Jun 4, 2024
bb43c85
BLD: test delocate works by removing original lib (#20870)
andyfaff Jun 4, 2024
cfd42a3
Merge pull request #20887 from czgdp1807/signal_pyx
rgommers Jun 4, 2024
297b2c8
DOC: stats: Convert sampling tutorial to MyST-md (#20303)
melissawm Jun 5, 2024
f928e64
DOC: sparse: Correct `todense` documentation (#20242)
henry50 Jun 5, 2024
554b1c0
CI: Add workflow to build and upload free-threaded wheels (#20882)
andfoy Jun 5, 2024
0a43483
DOC: ndimage.convolve: modify `origin` param description (#20408)
m-maggi Jun 5, 2024
d8f9686
MAINT: sparse: Align matmul tests in `test_base.py` for spmatrix and …
dschult Jun 5, 2024
6836e4f
Add test for clang-17 build
steppi Jun 3, 2024
b91c7fb
Don't mix designated and non-designated initializers
steppi Jun 3, 2024
6e57035
CI: Make sure nightly free-threaded wheels are tested with GIL disabl…
andfoy Jun 5, 2024
59d8ebc
Merge pull request #20875 from steppi/special-warning
rgommers Jun 5, 2024
de85b05
DOC Update doc for the argument `sort`in `linalg.schur`. (#20906)
m-maggi Jun 6, 2024
2f930ed
TST: linalg: bump tolerance in TestEig::test_singular
ev-br Jun 6, 2024
0ea108b
BLD: optimize: use hidden visibility for static HiGHS libraries
rgommers Jun 7, 2024
d8301dc
Merge pull request #20914 from ev-br/geneig_tol_tweak
lucascolley Jun 7, 2024
4977ec5
BUG: sparse.csgraph.dijkstra: fix dtype and shape bugs (#20913)
larsoner Jun 7, 2024
491f1d7
BUG: stats.mstats: fix mstats.{ttest_rel, ttest_1samp} when array api is
j-bowhay Jun 7, 2024
abfd277
CI: run array API tests for all of stats
j-bowhay Jun 7, 2024
1e72dea
DOC: update doctests to satisfy scipy-doctests==1.2.0
luxedo Jun 7, 2024
b4c57df
ENH: stats: add array API support to combine_pvalues (#20900)
j-bowhay Jun 7, 2024
7292d58
BUG: ensure reasonable length _deprecate_positional_args messages
cjerdonek Jun 8, 2024
c954e19
Merge pull request #20923 from luxedo/DOC/20921
ev-br Jun 8, 2024
a5a9b4c
MAINT: adapt to a scipy-doctests change
ev-br Jun 8, 2024
7df6e32
DOC: interpolate: fix the example in the tutorial
ev-br Jun 8, 2024
14e5d12
Merge pull request #20927 from ev-br/smoke-docs-test-none
lucascolley Jun 8, 2024
3788f77
Merge pull request #20924 from cjerdonek/issue-20910-pos-arg-deprecat…
tupui Jun 8, 2024
0570c89
Merge pull request #20919 from rgommers/highs-static-nosymbol-export
lucascolley Jun 8, 2024
bef12c0
Merge pull request #20922 from j-bowhay/fix_mstats_tests
lucascolley Jun 8, 2024
3240ece
Merge pull request #20759 from mtsokol/pydata-sparse
lucascolley Jun 8, 2024
283bb6b
MAINT: Defer setting title and key in HBInfo
pavyamsiri Jun 9, 2024
a95defc
Merge pull request #20932 from pavyamsiri/harwell-boeing-constructor
lucascolley Jun 9, 2024
1033ef4
Merge remote-tracking branch 'upstream/main' into rv_infrastructure
mdhaber Jun 9, 2024
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
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ commands:
command: |
echo $(git log -1 --pretty=%B) | tee gitlog.txt
echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
if [[ $(cat merge.txt) != "" ]]; then
echo "Merging $(cat merge.txt)";
git remote add upstream https://github.com/scipy/scipy.git;
git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
git fetch upstream main;
fi

jobs:
# Build SciPy from source
Expand Down
7 changes: 4 additions & 3 deletions scipy/integrate/_tanhsinh.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,10 @@ def check_termination(work):
# Terminate before first iteration if integration limits are equal
if work.nit == 0:
i = (work.a == work.b).ravel() # ravel singleton dimension
zero = -np.inf if log else 0
work.Sn[i] = zero
work.aerr[i] = zero
zero = np.full(work.Sn.shape, -np.inf if log else 0, dtype=Sn.dtype)
zero[np.isnan(Sn)] = np.nan
work.Sn[i] = zero[i]
work.aerr[i] = zero[i]
work.status[i] = eim._ECONVERGED
stop[i] = True
else:
Expand Down
4 changes: 2 additions & 2 deletions scipy/optimize/_bracket.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def _bracket_root_iv(func, xl0, xr0, xmin, xmax, factor, args, maxiter):
if not maxiter == maxiter_int or maxiter < 0:
raise ValueError(message)

if not np.all((xmin <= xl0) & (xl0 < xr0) & (xr0 <= xmax)):
raise ValueError('`xmin <= xl0 < xr0 <= xmax` must be True (elementwise).')
# if not np.all((xmin <= xl0) & (xl0 < xr0) & (xr0 <= xmax)):
# raise ValueError('`xmin <= xl0 < xr0 <= xmax` must be True (elementwise).')

return func, xl0, xr0, xmin, xmax, factor, args, maxiter

Expand Down
17 changes: 17 additions & 0 deletions scipy/stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@
Probability distributions
=========================

Random Variables
----------------

.. autosummary::
:toctree: generated/

ContinuousDistribution
ShiftedScaledDistribution
CircularDistribution
LogUniform
Normal
Uniform


Each univariate distribution is an instance of a subclass of `rv_continuous`
(`rv_discrete` for discrete distributions):

Expand Down Expand Up @@ -631,6 +645,9 @@
from ._covariance import Covariance
from ._sensitivity_analysis import *
from ._survival import *
from ._new_distributions import (
LogUniform, ShiftedScaledDistribution, Uniform,
CircularDistribution, ContinuousDistribution, Normal)

# Deprecated namespaces, to be removed in v2.0.0
from . import (
Expand Down
5,082 changes: 5,082 additions & 0 deletions scipy/stats/_distribution_infrastructure.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions scipy/stats/_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,9 +1237,10 @@ def _compute_dminus(cdfvals):
return (cdfvals - np.arange(0.0, n)/n).max(axis=-1)


def _kolmogorov_smirnov(dist, data, axis):
x = np.sort(data, axis=-1)
def _kolmogorov_smirnov(dist, data, axis=-1):
x = np.sort(data, axis=axis)
cdfvals = dist.cdf(x)
cdfvals = np.moveaxis(cdfvals, axis, -1)
Dplus = _compute_dplus(cdfvals) # always works along last axis
Dminus = _compute_dminus(cdfvals)
return np.maximum(Dplus, Dminus)
Expand Down
Loading