scipy 1.16.2__cp314-cp314-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scipy/__config__.py +161 -0
- scipy/__init__.py +150 -0
- scipy/_cyutility.cp314-win_arm64.lib +0 -0
- scipy/_cyutility.cp314-win_arm64.pyd +0 -0
- scipy/_distributor_init.py +18 -0
- scipy/_lib/__init__.py +14 -0
- scipy/_lib/_array_api.py +931 -0
- scipy/_lib/_array_api_compat_vendor.py +9 -0
- scipy/_lib/_array_api_no_0d.py +103 -0
- scipy/_lib/_bunch.py +229 -0
- scipy/_lib/_ccallback.py +251 -0
- scipy/_lib/_ccallback_c.cp314-win_arm64.lib +0 -0
- scipy/_lib/_ccallback_c.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_disjoint_set.py +254 -0
- scipy/_lib/_docscrape.py +761 -0
- scipy/_lib/_elementwise_iterative_method.py +346 -0
- scipy/_lib/_fpumode.cp314-win_arm64.lib +0 -0
- scipy/_lib/_fpumode.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_gcutils.py +105 -0
- scipy/_lib/_pep440.py +487 -0
- scipy/_lib/_sparse.py +41 -0
- scipy/_lib/_test_ccallback.cp314-win_arm64.lib +0 -0
- scipy/_lib/_test_ccallback.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_test_deprecation_call.cp314-win_arm64.lib +0 -0
- scipy/_lib/_test_deprecation_call.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_test_deprecation_def.cp314-win_arm64.lib +0 -0
- scipy/_lib/_test_deprecation_def.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_testutils.py +373 -0
- scipy/_lib/_threadsafety.py +58 -0
- scipy/_lib/_tmpdirs.py +86 -0
- scipy/_lib/_uarray/LICENSE +29 -0
- scipy/_lib/_uarray/__init__.py +116 -0
- scipy/_lib/_uarray/_backend.py +707 -0
- scipy/_lib/_uarray/_uarray.cp314-win_arm64.lib +0 -0
- scipy/_lib/_uarray/_uarray.cp314-win_arm64.pyd +0 -0
- scipy/_lib/_util.py +1283 -0
- scipy/_lib/array_api_compat/__init__.py +22 -0
- scipy/_lib/array_api_compat/_internal.py +59 -0
- scipy/_lib/array_api_compat/common/__init__.py +1 -0
- scipy/_lib/array_api_compat/common/_aliases.py +727 -0
- scipy/_lib/array_api_compat/common/_fft.py +213 -0
- scipy/_lib/array_api_compat/common/_helpers.py +1058 -0
- scipy/_lib/array_api_compat/common/_linalg.py +232 -0
- scipy/_lib/array_api_compat/common/_typing.py +192 -0
- scipy/_lib/array_api_compat/cupy/__init__.py +13 -0
- scipy/_lib/array_api_compat/cupy/_aliases.py +156 -0
- scipy/_lib/array_api_compat/cupy/_info.py +336 -0
- scipy/_lib/array_api_compat/cupy/_typing.py +31 -0
- scipy/_lib/array_api_compat/cupy/fft.py +36 -0
- scipy/_lib/array_api_compat/cupy/linalg.py +49 -0
- scipy/_lib/array_api_compat/dask/__init__.py +0 -0
- scipy/_lib/array_api_compat/dask/array/__init__.py +12 -0
- scipy/_lib/array_api_compat/dask/array/_aliases.py +376 -0
- scipy/_lib/array_api_compat/dask/array/_info.py +416 -0
- scipy/_lib/array_api_compat/dask/array/fft.py +21 -0
- scipy/_lib/array_api_compat/dask/array/linalg.py +72 -0
- scipy/_lib/array_api_compat/numpy/__init__.py +28 -0
- scipy/_lib/array_api_compat/numpy/_aliases.py +190 -0
- scipy/_lib/array_api_compat/numpy/_info.py +366 -0
- scipy/_lib/array_api_compat/numpy/_typing.py +30 -0
- scipy/_lib/array_api_compat/numpy/fft.py +35 -0
- scipy/_lib/array_api_compat/numpy/linalg.py +143 -0
- scipy/_lib/array_api_compat/torch/__init__.py +22 -0
- scipy/_lib/array_api_compat/torch/_aliases.py +855 -0
- scipy/_lib/array_api_compat/torch/_info.py +369 -0
- scipy/_lib/array_api_compat/torch/_typing.py +3 -0
- scipy/_lib/array_api_compat/torch/fft.py +85 -0
- scipy/_lib/array_api_compat/torch/linalg.py +121 -0
- scipy/_lib/array_api_extra/__init__.py +38 -0
- scipy/_lib/array_api_extra/_delegation.py +171 -0
- scipy/_lib/array_api_extra/_lib/__init__.py +1 -0
- scipy/_lib/array_api_extra/_lib/_at.py +463 -0
- scipy/_lib/array_api_extra/_lib/_backends.py +46 -0
- scipy/_lib/array_api_extra/_lib/_funcs.py +937 -0
- scipy/_lib/array_api_extra/_lib/_lazy.py +357 -0
- scipy/_lib/array_api_extra/_lib/_testing.py +278 -0
- scipy/_lib/array_api_extra/_lib/_utils/__init__.py +1 -0
- scipy/_lib/array_api_extra/_lib/_utils/_compat.py +74 -0
- scipy/_lib/array_api_extra/_lib/_utils/_compat.pyi +45 -0
- scipy/_lib/array_api_extra/_lib/_utils/_helpers.py +559 -0
- scipy/_lib/array_api_extra/_lib/_utils/_typing.py +10 -0
- scipy/_lib/array_api_extra/_lib/_utils/_typing.pyi +105 -0
- scipy/_lib/array_api_extra/testing.py +359 -0
- scipy/_lib/cobyqa/__init__.py +20 -0
- scipy/_lib/cobyqa/framework.py +1240 -0
- scipy/_lib/cobyqa/main.py +1506 -0
- scipy/_lib/cobyqa/models.py +1529 -0
- scipy/_lib/cobyqa/problem.py +1296 -0
- scipy/_lib/cobyqa/settings.py +132 -0
- scipy/_lib/cobyqa/subsolvers/__init__.py +14 -0
- scipy/_lib/cobyqa/subsolvers/geometry.py +387 -0
- scipy/_lib/cobyqa/subsolvers/optim.py +1203 -0
- scipy/_lib/cobyqa/utils/__init__.py +18 -0
- scipy/_lib/cobyqa/utils/exceptions.py +22 -0
- scipy/_lib/cobyqa/utils/math.py +77 -0
- scipy/_lib/cobyqa/utils/versions.py +67 -0
- scipy/_lib/decorator.py +399 -0
- scipy/_lib/deprecation.py +274 -0
- scipy/_lib/doccer.py +366 -0
- scipy/_lib/messagestream.cp314-win_arm64.lib +0 -0
- scipy/_lib/messagestream.cp314-win_arm64.pyd +0 -0
- scipy/_lib/pyprima/__init__.py +212 -0
- scipy/_lib/pyprima/cobyla/__init__.py +0 -0
- scipy/_lib/pyprima/cobyla/cobyla.py +559 -0
- scipy/_lib/pyprima/cobyla/cobylb.py +714 -0
- scipy/_lib/pyprima/cobyla/geometry.py +226 -0
- scipy/_lib/pyprima/cobyla/initialize.py +215 -0
- scipy/_lib/pyprima/cobyla/trustregion.py +492 -0
- scipy/_lib/pyprima/cobyla/update.py +289 -0
- scipy/_lib/pyprima/common/__init__.py +0 -0
- scipy/_lib/pyprima/common/_bounds.py +34 -0
- scipy/_lib/pyprima/common/_linear_constraints.py +46 -0
- scipy/_lib/pyprima/common/_nonlinear_constraints.py +54 -0
- scipy/_lib/pyprima/common/_project.py +173 -0
- scipy/_lib/pyprima/common/checkbreak.py +93 -0
- scipy/_lib/pyprima/common/consts.py +47 -0
- scipy/_lib/pyprima/common/evaluate.py +99 -0
- scipy/_lib/pyprima/common/history.py +38 -0
- scipy/_lib/pyprima/common/infos.py +30 -0
- scipy/_lib/pyprima/common/linalg.py +435 -0
- scipy/_lib/pyprima/common/message.py +290 -0
- scipy/_lib/pyprima/common/powalg.py +131 -0
- scipy/_lib/pyprima/common/preproc.py +277 -0
- scipy/_lib/pyprima/common/present.py +5 -0
- scipy/_lib/pyprima/common/ratio.py +54 -0
- scipy/_lib/pyprima/common/redrho.py +47 -0
- scipy/_lib/pyprima/common/selectx.py +296 -0
- scipy/_lib/tests/__init__.py +0 -0
- scipy/_lib/tests/test__gcutils.py +110 -0
- scipy/_lib/tests/test__pep440.py +67 -0
- scipy/_lib/tests/test__testutils.py +32 -0
- scipy/_lib/tests/test__threadsafety.py +51 -0
- scipy/_lib/tests/test__util.py +641 -0
- scipy/_lib/tests/test_array_api.py +322 -0
- scipy/_lib/tests/test_bunch.py +169 -0
- scipy/_lib/tests/test_ccallback.py +196 -0
- scipy/_lib/tests/test_config.py +45 -0
- scipy/_lib/tests/test_deprecation.py +10 -0
- scipy/_lib/tests/test_doccer.py +143 -0
- scipy/_lib/tests/test_import_cycles.py +18 -0
- scipy/_lib/tests/test_public_api.py +482 -0
- scipy/_lib/tests/test_scipy_version.py +28 -0
- scipy/_lib/tests/test_tmpdirs.py +48 -0
- scipy/_lib/tests/test_warnings.py +137 -0
- scipy/_lib/uarray.py +31 -0
- scipy/cluster/__init__.py +31 -0
- scipy/cluster/_hierarchy.cp314-win_arm64.lib +0 -0
- scipy/cluster/_hierarchy.cp314-win_arm64.pyd +0 -0
- scipy/cluster/_optimal_leaf_ordering.cp314-win_arm64.lib +0 -0
- scipy/cluster/_optimal_leaf_ordering.cp314-win_arm64.pyd +0 -0
- scipy/cluster/_vq.cp314-win_arm64.lib +0 -0
- scipy/cluster/_vq.cp314-win_arm64.pyd +0 -0
- scipy/cluster/hierarchy.py +4348 -0
- scipy/cluster/tests/__init__.py +0 -0
- scipy/cluster/tests/hierarchy_test_data.py +145 -0
- scipy/cluster/tests/test_disjoint_set.py +202 -0
- scipy/cluster/tests/test_hierarchy.py +1238 -0
- scipy/cluster/tests/test_vq.py +434 -0
- scipy/cluster/vq.py +832 -0
- scipy/conftest.py +683 -0
- scipy/constants/__init__.py +358 -0
- scipy/constants/_codata.py +2266 -0
- scipy/constants/_constants.py +369 -0
- scipy/constants/codata.py +21 -0
- scipy/constants/constants.py +53 -0
- scipy/constants/tests/__init__.py +0 -0
- scipy/constants/tests/test_codata.py +78 -0
- scipy/constants/tests/test_constants.py +83 -0
- scipy/datasets/__init__.py +90 -0
- scipy/datasets/_download_all.py +71 -0
- scipy/datasets/_fetchers.py +225 -0
- scipy/datasets/_registry.py +26 -0
- scipy/datasets/_utils.py +81 -0
- scipy/datasets/tests/__init__.py +0 -0
- scipy/datasets/tests/test_data.py +128 -0
- scipy/differentiate/__init__.py +27 -0
- scipy/differentiate/_differentiate.py +1129 -0
- scipy/differentiate/tests/__init__.py +0 -0
- scipy/differentiate/tests/test_differentiate.py +694 -0
- scipy/fft/__init__.py +114 -0
- scipy/fft/_backend.py +196 -0
- scipy/fft/_basic.py +1650 -0
- scipy/fft/_basic_backend.py +197 -0
- scipy/fft/_debug_backends.py +22 -0
- scipy/fft/_fftlog.py +223 -0
- scipy/fft/_fftlog_backend.py +200 -0
- scipy/fft/_helper.py +348 -0
- scipy/fft/_pocketfft/LICENSE.md +25 -0
- scipy/fft/_pocketfft/__init__.py +9 -0
- scipy/fft/_pocketfft/basic.py +251 -0
- scipy/fft/_pocketfft/helper.py +249 -0
- scipy/fft/_pocketfft/pypocketfft.cp314-win_arm64.lib +0 -0
- scipy/fft/_pocketfft/pypocketfft.cp314-win_arm64.pyd +0 -0
- scipy/fft/_pocketfft/realtransforms.py +109 -0
- scipy/fft/_pocketfft/tests/__init__.py +0 -0
- scipy/fft/_pocketfft/tests/test_basic.py +1011 -0
- scipy/fft/_pocketfft/tests/test_real_transforms.py +505 -0
- scipy/fft/_realtransforms.py +706 -0
- scipy/fft/_realtransforms_backend.py +63 -0
- scipy/fft/tests/__init__.py +0 -0
- scipy/fft/tests/mock_backend.py +96 -0
- scipy/fft/tests/test_backend.py +98 -0
- scipy/fft/tests/test_basic.py +504 -0
- scipy/fft/tests/test_fftlog.py +215 -0
- scipy/fft/tests/test_helper.py +558 -0
- scipy/fft/tests/test_multithreading.py +84 -0
- scipy/fft/tests/test_real_transforms.py +247 -0
- scipy/fftpack/__init__.py +103 -0
- scipy/fftpack/_basic.py +428 -0
- scipy/fftpack/_helper.py +115 -0
- scipy/fftpack/_pseudo_diffs.py +554 -0
- scipy/fftpack/_realtransforms.py +598 -0
- scipy/fftpack/basic.py +20 -0
- scipy/fftpack/convolve.cp314-win_arm64.lib +0 -0
- scipy/fftpack/convolve.cp314-win_arm64.pyd +0 -0
- scipy/fftpack/helper.py +19 -0
- scipy/fftpack/pseudo_diffs.py +22 -0
- scipy/fftpack/realtransforms.py +19 -0
- scipy/fftpack/tests/__init__.py +0 -0
- scipy/fftpack/tests/fftw_double_ref.npz +0 -0
- scipy/fftpack/tests/fftw_longdouble_ref.npz +0 -0
- scipy/fftpack/tests/fftw_single_ref.npz +0 -0
- scipy/fftpack/tests/test.npz +0 -0
- scipy/fftpack/tests/test_basic.py +877 -0
- scipy/fftpack/tests/test_helper.py +54 -0
- scipy/fftpack/tests/test_import.py +33 -0
- scipy/fftpack/tests/test_pseudo_diffs.py +388 -0
- scipy/fftpack/tests/test_real_transforms.py +836 -0
- scipy/integrate/__init__.py +122 -0
- scipy/integrate/_bvp.py +1160 -0
- scipy/integrate/_cubature.py +729 -0
- scipy/integrate/_dop.cp314-win_arm64.lib +0 -0
- scipy/integrate/_dop.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_ivp/__init__.py +8 -0
- scipy/integrate/_ivp/base.py +290 -0
- scipy/integrate/_ivp/bdf.py +478 -0
- scipy/integrate/_ivp/common.py +451 -0
- scipy/integrate/_ivp/dop853_coefficients.py +193 -0
- scipy/integrate/_ivp/ivp.py +755 -0
- scipy/integrate/_ivp/lsoda.py +224 -0
- scipy/integrate/_ivp/radau.py +572 -0
- scipy/integrate/_ivp/rk.py +601 -0
- scipy/integrate/_ivp/tests/__init__.py +0 -0
- scipy/integrate/_ivp/tests/test_ivp.py +1287 -0
- scipy/integrate/_ivp/tests/test_rk.py +37 -0
- scipy/integrate/_lebedev.py +5450 -0
- scipy/integrate/_lsoda.cp314-win_arm64.lib +0 -0
- scipy/integrate/_lsoda.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_ode.py +1395 -0
- scipy/integrate/_odepack.cp314-win_arm64.lib +0 -0
- scipy/integrate/_odepack.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_odepack_py.py +273 -0
- scipy/integrate/_quad_vec.py +674 -0
- scipy/integrate/_quadpack.cp314-win_arm64.lib +0 -0
- scipy/integrate/_quadpack.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_quadpack_py.py +1283 -0
- scipy/integrate/_quadrature.py +1336 -0
- scipy/integrate/_rules/__init__.py +12 -0
- scipy/integrate/_rules/_base.py +518 -0
- scipy/integrate/_rules/_gauss_kronrod.py +202 -0
- scipy/integrate/_rules/_gauss_legendre.py +62 -0
- scipy/integrate/_rules/_genz_malik.py +210 -0
- scipy/integrate/_tanhsinh.py +1385 -0
- scipy/integrate/_test_multivariate.cp314-win_arm64.lib +0 -0
- scipy/integrate/_test_multivariate.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_test_odeint_banded.cp314-win_arm64.lib +0 -0
- scipy/integrate/_test_odeint_banded.cp314-win_arm64.pyd +0 -0
- scipy/integrate/_vode.cp314-win_arm64.lib +0 -0
- scipy/integrate/_vode.cp314-win_arm64.pyd +0 -0
- scipy/integrate/dop.py +15 -0
- scipy/integrate/lsoda.py +15 -0
- scipy/integrate/odepack.py +17 -0
- scipy/integrate/quadpack.py +23 -0
- scipy/integrate/tests/__init__.py +0 -0
- scipy/integrate/tests/test__quad_vec.py +211 -0
- scipy/integrate/tests/test_banded_ode_solvers.py +305 -0
- scipy/integrate/tests/test_bvp.py +714 -0
- scipy/integrate/tests/test_cubature.py +1375 -0
- scipy/integrate/tests/test_integrate.py +840 -0
- scipy/integrate/tests/test_odeint_jac.py +74 -0
- scipy/integrate/tests/test_quadpack.py +680 -0
- scipy/integrate/tests/test_quadrature.py +730 -0
- scipy/integrate/tests/test_tanhsinh.py +1171 -0
- scipy/integrate/vode.py +15 -0
- scipy/interpolate/__init__.py +228 -0
- scipy/interpolate/_bary_rational.py +715 -0
- scipy/interpolate/_bsplines.py +2469 -0
- scipy/interpolate/_cubic.py +973 -0
- scipy/interpolate/_dfitpack.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_dfitpack.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_dierckx.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_dierckx.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_fitpack.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_fitpack.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_fitpack2.py +2397 -0
- scipy/interpolate/_fitpack_impl.py +811 -0
- scipy/interpolate/_fitpack_py.py +898 -0
- scipy/interpolate/_fitpack_repro.py +996 -0
- scipy/interpolate/_interpnd.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_interpnd.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_interpolate.py +2266 -0
- scipy/interpolate/_ndbspline.py +415 -0
- scipy/interpolate/_ndgriddata.py +329 -0
- scipy/interpolate/_pade.py +67 -0
- scipy/interpolate/_polyint.py +1025 -0
- scipy/interpolate/_ppoly.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_ppoly.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_rbf.py +290 -0
- scipy/interpolate/_rbfinterp.py +550 -0
- scipy/interpolate/_rbfinterp_pythran.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_rbfinterp_pythran.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/_rgi.py +764 -0
- scipy/interpolate/_rgi_cython.cp314-win_arm64.lib +0 -0
- scipy/interpolate/_rgi_cython.cp314-win_arm64.pyd +0 -0
- scipy/interpolate/dfitpack.py +24 -0
- scipy/interpolate/fitpack.py +31 -0
- scipy/interpolate/fitpack2.py +29 -0
- scipy/interpolate/interpnd.py +24 -0
- scipy/interpolate/interpolate.py +30 -0
- scipy/interpolate/ndgriddata.py +23 -0
- scipy/interpolate/polyint.py +24 -0
- scipy/interpolate/rbf.py +18 -0
- scipy/interpolate/tests/__init__.py +0 -0
- scipy/interpolate/tests/data/bug-1310.npz +0 -0
- scipy/interpolate/tests/data/estimate_gradients_hang.npy +0 -0
- scipy/interpolate/tests/data/gcvspl.npz +0 -0
- scipy/interpolate/tests/test_bary_rational.py +368 -0
- scipy/interpolate/tests/test_bsplines.py +3754 -0
- scipy/interpolate/tests/test_fitpack.py +519 -0
- scipy/interpolate/tests/test_fitpack2.py +1431 -0
- scipy/interpolate/tests/test_gil.py +64 -0
- scipy/interpolate/tests/test_interpnd.py +452 -0
- scipy/interpolate/tests/test_interpolate.py +2630 -0
- scipy/interpolate/tests/test_ndgriddata.py +308 -0
- scipy/interpolate/tests/test_pade.py +107 -0
- scipy/interpolate/tests/test_polyint.py +972 -0
- scipy/interpolate/tests/test_rbf.py +246 -0
- scipy/interpolate/tests/test_rbfinterp.py +534 -0
- scipy/interpolate/tests/test_rgi.py +1151 -0
- scipy/io/__init__.py +116 -0
- scipy/io/_fast_matrix_market/__init__.py +600 -0
- scipy/io/_fast_matrix_market/_fmm_core.cp314-win_arm64.lib +0 -0
- scipy/io/_fast_matrix_market/_fmm_core.cp314-win_arm64.pyd +0 -0
- scipy/io/_fortran.py +354 -0
- scipy/io/_harwell_boeing/__init__.py +7 -0
- scipy/io/_harwell_boeing/_fortran_format_parser.py +316 -0
- scipy/io/_harwell_boeing/hb.py +571 -0
- scipy/io/_harwell_boeing/tests/__init__.py +0 -0
- scipy/io/_harwell_boeing/tests/test_fortran_format.py +74 -0
- scipy/io/_harwell_boeing/tests/test_hb.py +70 -0
- scipy/io/_idl.py +917 -0
- scipy/io/_mmio.py +968 -0
- scipy/io/_netcdf.py +1104 -0
- scipy/io/_test_fortran.cp314-win_arm64.lib +0 -0
- scipy/io/_test_fortran.cp314-win_arm64.pyd +0 -0
- scipy/io/arff/__init__.py +28 -0
- scipy/io/arff/_arffread.py +873 -0
- scipy/io/arff/arffread.py +19 -0
- scipy/io/arff/tests/__init__.py +0 -0
- scipy/io/arff/tests/data/iris.arff +225 -0
- scipy/io/arff/tests/data/missing.arff +8 -0
- scipy/io/arff/tests/data/nodata.arff +11 -0
- scipy/io/arff/tests/data/quoted_nominal.arff +13 -0
- scipy/io/arff/tests/data/quoted_nominal_spaces.arff +13 -0
- scipy/io/arff/tests/data/test1.arff +10 -0
- scipy/io/arff/tests/data/test10.arff +8 -0
- scipy/io/arff/tests/data/test11.arff +11 -0
- scipy/io/arff/tests/data/test2.arff +15 -0
- scipy/io/arff/tests/data/test3.arff +6 -0
- scipy/io/arff/tests/data/test4.arff +11 -0
- scipy/io/arff/tests/data/test5.arff +26 -0
- scipy/io/arff/tests/data/test6.arff +12 -0
- scipy/io/arff/tests/data/test7.arff +15 -0
- scipy/io/arff/tests/data/test8.arff +12 -0
- scipy/io/arff/tests/data/test9.arff +14 -0
- scipy/io/arff/tests/test_arffread.py +421 -0
- scipy/io/harwell_boeing.py +17 -0
- scipy/io/idl.py +17 -0
- scipy/io/matlab/__init__.py +66 -0
- scipy/io/matlab/_byteordercodes.py +75 -0
- scipy/io/matlab/_mio.py +375 -0
- scipy/io/matlab/_mio4.py +632 -0
- scipy/io/matlab/_mio5.py +901 -0
- scipy/io/matlab/_mio5_params.py +281 -0
- scipy/io/matlab/_mio5_utils.cp314-win_arm64.lib +0 -0
- scipy/io/matlab/_mio5_utils.cp314-win_arm64.pyd +0 -0
- scipy/io/matlab/_mio_utils.cp314-win_arm64.lib +0 -0
- scipy/io/matlab/_mio_utils.cp314-win_arm64.pyd +0 -0
- scipy/io/matlab/_miobase.py +435 -0
- scipy/io/matlab/_streams.cp314-win_arm64.lib +0 -0
- scipy/io/matlab/_streams.cp314-win_arm64.pyd +0 -0
- scipy/io/matlab/byteordercodes.py +17 -0
- scipy/io/matlab/mio.py +16 -0
- scipy/io/matlab/mio4.py +17 -0
- scipy/io/matlab/mio5.py +19 -0
- scipy/io/matlab/mio5_params.py +18 -0
- scipy/io/matlab/mio5_utils.py +17 -0
- scipy/io/matlab/mio_utils.py +17 -0
- scipy/io/matlab/miobase.py +16 -0
- scipy/io/matlab/streams.py +16 -0
- scipy/io/matlab/tests/__init__.py +0 -0
- scipy/io/matlab/tests/data/bad_miuint32.mat +0 -0
- scipy/io/matlab/tests/data/bad_miutf8_array_name.mat +0 -0
- scipy/io/matlab/tests/data/big_endian.mat +0 -0
- scipy/io/matlab/tests/data/broken_utf8.mat +0 -0
- scipy/io/matlab/tests/data/corrupted_zlib_checksum.mat +0 -0
- scipy/io/matlab/tests/data/corrupted_zlib_data.mat +0 -0
- scipy/io/matlab/tests/data/debigged_m4.mat +0 -0
- scipy/io/matlab/tests/data/japanese_utf8.txt +5 -0
- scipy/io/matlab/tests/data/little_endian.mat +0 -0
- scipy/io/matlab/tests/data/logical_sparse.mat +0 -0
- scipy/io/matlab/tests/data/malformed1.mat +0 -0
- scipy/io/matlab/tests/data/miuint32_for_miint32.mat +0 -0
- scipy/io/matlab/tests/data/miutf8_array_name.mat +0 -0
- scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat +0 -0
- scipy/io/matlab/tests/data/one_by_zero_char.mat +0 -0
- scipy/io/matlab/tests/data/parabola.mat +0 -0
- scipy/io/matlab/tests/data/single_empty_string.mat +0 -0
- scipy/io/matlab/tests/data/some_functions.mat +0 -0
- scipy/io/matlab/tests/data/sqr.mat +0 -0
- scipy/io/matlab/tests/data/test3dmatrix_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/test3dmatrix_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/test3dmatrix_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/test3dmatrix_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/test_empty_struct.mat +0 -0
- scipy/io/matlab/tests/data/test_mat4_le_floats.mat +0 -0
- scipy/io/matlab/tests/data/test_skip_variable.mat +0 -0
- scipy/io/matlab/tests/data/testbool_8_WIN64.mat +0 -0
- scipy/io/matlab/tests/data/testcell_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testcell_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcell_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcell_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcellnest_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testcellnest_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcellnest_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcellnest_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcomplex_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testcomplex_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testcomplex_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcomplex_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testcomplex_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testdouble_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testdouble_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testdouble_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testdouble_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testdouble_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testemptycell_5.3_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testemptycell_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testemptycell_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testemptycell_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testfunc_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testhdf5_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testmatrix_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testmatrix_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testmatrix_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testmatrix_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testmatrix_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testminus_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testminus_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testminus_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testminus_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testminus_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testmulti_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testmulti_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testmulti_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testobject_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testobject_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testobject_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testobject_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testonechar_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testonechar_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testonechar_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testonechar_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testonechar_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testscalarcell_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsimplecell.mat +0 -0
- scipy/io/matlab/tests/data/testsparse_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testsparse_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testsparse_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparse_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparse_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparsecomplex_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testsparsecomplex_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/testsparsecomplex_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparsecomplex_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparsecomplex_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testsparsefloat_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststring_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststring_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststring_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststring_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststring_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststringarray_4.2c_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststringarray_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststringarray_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststringarray_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststringarray_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststruct_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststruct_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststruct_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststruct_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructarr_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststructarr_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructarr_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructarr_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructnest_6.1_SOL2.mat +0 -0
- scipy/io/matlab/tests/data/teststructnest_6.5.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructnest_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/teststructnest_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testunicode_7.1_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testunicode_7.4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/data/testvec_4_GLNX86.mat +0 -0
- scipy/io/matlab/tests/test_byteordercodes.py +29 -0
- scipy/io/matlab/tests/test_mio.py +1399 -0
- scipy/io/matlab/tests/test_mio5_utils.py +179 -0
- scipy/io/matlab/tests/test_mio_funcs.py +51 -0
- scipy/io/matlab/tests/test_mio_utils.py +45 -0
- scipy/io/matlab/tests/test_miobase.py +32 -0
- scipy/io/matlab/tests/test_pathological.py +33 -0
- scipy/io/matlab/tests/test_streams.py +241 -0
- scipy/io/mmio.py +17 -0
- scipy/io/netcdf.py +17 -0
- scipy/io/tests/__init__.py +0 -0
- scipy/io/tests/data/Transparent Busy.ani +0 -0
- scipy/io/tests/data/array_float32_1d.sav +0 -0
- scipy/io/tests/data/array_float32_2d.sav +0 -0
- scipy/io/tests/data/array_float32_3d.sav +0 -0
- scipy/io/tests/data/array_float32_4d.sav +0 -0
- scipy/io/tests/data/array_float32_5d.sav +0 -0
- scipy/io/tests/data/array_float32_6d.sav +0 -0
- scipy/io/tests/data/array_float32_7d.sav +0 -0
- scipy/io/tests/data/array_float32_8d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_1d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_2d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_3d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_4d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_5d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_6d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_7d.sav +0 -0
- scipy/io/tests/data/array_float32_pointer_8d.sav +0 -0
- scipy/io/tests/data/example_1.nc +0 -0
- scipy/io/tests/data/example_2.nc +0 -0
- scipy/io/tests/data/example_3_maskedvals.nc +0 -0
- scipy/io/tests/data/fortran-3x3d-2i.dat +0 -0
- scipy/io/tests/data/fortran-mixed.dat +0 -0
- scipy/io/tests/data/fortran-sf8-11x1x10.dat +0 -0
- scipy/io/tests/data/fortran-sf8-15x10x22.dat +0 -0
- scipy/io/tests/data/fortran-sf8-1x1x1.dat +0 -0
- scipy/io/tests/data/fortran-sf8-1x1x5.dat +0 -0
- scipy/io/tests/data/fortran-sf8-1x1x7.dat +0 -0
- scipy/io/tests/data/fortran-sf8-1x3x5.dat +0 -0
- scipy/io/tests/data/fortran-si4-11x1x10.dat +0 -0
- scipy/io/tests/data/fortran-si4-15x10x22.dat +0 -0
- scipy/io/tests/data/fortran-si4-1x1x1.dat +0 -0
- scipy/io/tests/data/fortran-si4-1x1x5.dat +0 -0
- scipy/io/tests/data/fortran-si4-1x1x7.dat +0 -0
- scipy/io/tests/data/fortran-si4-1x3x5.dat +0 -0
- scipy/io/tests/data/invalid_pointer.sav +0 -0
- scipy/io/tests/data/null_pointer.sav +0 -0
- scipy/io/tests/data/scalar_byte.sav +0 -0
- scipy/io/tests/data/scalar_byte_descr.sav +0 -0
- scipy/io/tests/data/scalar_complex32.sav +0 -0
- scipy/io/tests/data/scalar_complex64.sav +0 -0
- scipy/io/tests/data/scalar_float32.sav +0 -0
- scipy/io/tests/data/scalar_float64.sav +0 -0
- scipy/io/tests/data/scalar_heap_pointer.sav +0 -0
- scipy/io/tests/data/scalar_int16.sav +0 -0
- scipy/io/tests/data/scalar_int32.sav +0 -0
- scipy/io/tests/data/scalar_int64.sav +0 -0
- scipy/io/tests/data/scalar_string.sav +0 -0
- scipy/io/tests/data/scalar_uint16.sav +0 -0
- scipy/io/tests/data/scalar_uint32.sav +0 -0
- scipy/io/tests/data/scalar_uint64.sav +0 -0
- scipy/io/tests/data/struct_arrays.sav +0 -0
- scipy/io/tests/data/struct_arrays_byte_idl80.sav +0 -0
- scipy/io/tests/data/struct_arrays_replicated.sav +0 -0
- scipy/io/tests/data/struct_arrays_replicated_3d.sav +0 -0
- scipy/io/tests/data/struct_inherit.sav +0 -0
- scipy/io/tests/data/struct_pointer_arrays.sav +0 -0
- scipy/io/tests/data/struct_pointer_arrays_replicated.sav +0 -0
- scipy/io/tests/data/struct_pointer_arrays_replicated_3d.sav +0 -0
- scipy/io/tests/data/struct_pointers.sav +0 -0
- scipy/io/tests/data/struct_pointers_replicated.sav +0 -0
- scipy/io/tests/data/struct_pointers_replicated_3d.sav +0 -0
- scipy/io/tests/data/struct_scalars.sav +0 -0
- scipy/io/tests/data/struct_scalars_replicated.sav +0 -0
- scipy/io/tests/data/struct_scalars_replicated_3d.sav +0 -0
- scipy/io/tests/data/test-1234Hz-le-1ch-10S-20bit-extra.wav +0 -0
- scipy/io/tests/data/test-44100Hz-2ch-32bit-float-be.wav +0 -0
- scipy/io/tests/data/test-44100Hz-2ch-32bit-float-le.wav +0 -0
- scipy/io/tests/data/test-44100Hz-be-1ch-4bytes.wav +0 -0
- scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-early-eof-no-data.wav +0 -0
- scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-early-eof.wav +0 -0
- scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-incomplete-chunk.wav +0 -0
- scipy/io/tests/data/test-44100Hz-le-1ch-4bytes-rf64.wav +0 -0
- scipy/io/tests/data/test-44100Hz-le-1ch-4bytes.wav +0 -0
- scipy/io/tests/data/test-48000Hz-2ch-64bit-float-le-wavex.wav +0 -0
- scipy/io/tests/data/test-8000Hz-be-3ch-5S-24bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-1ch-1byte-ulaw.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-2ch-1byteu.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit-inconsistent.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit-rf64.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-24bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-36bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-45bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-53bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-3ch-5S-64bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-4ch-9S-12bit.wav +0 -0
- scipy/io/tests/data/test-8000Hz-le-5ch-9S-5bit.wav +0 -0
- scipy/io/tests/data/various_compressed.sav +0 -0
- scipy/io/tests/test_fortran.py +264 -0
- scipy/io/tests/test_idl.py +483 -0
- scipy/io/tests/test_mmio.py +831 -0
- scipy/io/tests/test_netcdf.py +550 -0
- scipy/io/tests/test_paths.py +93 -0
- scipy/io/tests/test_wavfile.py +501 -0
- scipy/io/wavfile.py +938 -0
- scipy/linalg/__init__.pxd +1 -0
- scipy/linalg/__init__.py +236 -0
- scipy/linalg/_basic.py +2146 -0
- scipy/linalg/_blas_subroutines.h +164 -0
- scipy/linalg/_cythonized_array_utils.cp314-win_arm64.lib +0 -0
- scipy/linalg/_cythonized_array_utils.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_cythonized_array_utils.pxd +40 -0
- scipy/linalg/_cythonized_array_utils.pyi +16 -0
- scipy/linalg/_decomp.py +1645 -0
- scipy/linalg/_decomp_cholesky.py +413 -0
- scipy/linalg/_decomp_cossin.py +236 -0
- scipy/linalg/_decomp_interpolative.cp314-win_arm64.lib +0 -0
- scipy/linalg/_decomp_interpolative.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_decomp_ldl.py +356 -0
- scipy/linalg/_decomp_lu.py +401 -0
- scipy/linalg/_decomp_lu_cython.cp314-win_arm64.lib +0 -0
- scipy/linalg/_decomp_lu_cython.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_decomp_lu_cython.pyi +6 -0
- scipy/linalg/_decomp_polar.py +113 -0
- scipy/linalg/_decomp_qr.py +494 -0
- scipy/linalg/_decomp_qz.py +452 -0
- scipy/linalg/_decomp_schur.py +336 -0
- scipy/linalg/_decomp_svd.py +545 -0
- scipy/linalg/_decomp_update.cp314-win_arm64.lib +0 -0
- scipy/linalg/_decomp_update.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_expm_frechet.py +417 -0
- scipy/linalg/_fblas.cp314-win_arm64.lib +0 -0
- scipy/linalg/_fblas.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_flapack.cp314-win_arm64.lib +0 -0
- scipy/linalg/_flapack.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_lapack_subroutines.h +1521 -0
- scipy/linalg/_linalg_pythran.cp314-win_arm64.lib +0 -0
- scipy/linalg/_linalg_pythran.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_matfuncs.py +1050 -0
- scipy/linalg/_matfuncs_expm.cp314-win_arm64.lib +0 -0
- scipy/linalg/_matfuncs_expm.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_matfuncs_expm.pyi +6 -0
- scipy/linalg/_matfuncs_inv_ssq.py +886 -0
- scipy/linalg/_matfuncs_schur_sqrtm.cp314-win_arm64.lib +0 -0
- scipy/linalg/_matfuncs_schur_sqrtm.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_matfuncs_sqrtm.py +107 -0
- scipy/linalg/_matfuncs_sqrtm_triu.cp314-win_arm64.lib +0 -0
- scipy/linalg/_matfuncs_sqrtm_triu.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_misc.py +191 -0
- scipy/linalg/_procrustes.py +113 -0
- scipy/linalg/_sketches.py +189 -0
- scipy/linalg/_solve_toeplitz.cp314-win_arm64.lib +0 -0
- scipy/linalg/_solve_toeplitz.cp314-win_arm64.pyd +0 -0
- scipy/linalg/_solvers.py +862 -0
- scipy/linalg/_special_matrices.py +1322 -0
- scipy/linalg/_testutils.py +65 -0
- scipy/linalg/basic.py +23 -0
- scipy/linalg/blas.py +495 -0
- scipy/linalg/cython_blas.cp314-win_arm64.lib +0 -0
- scipy/linalg/cython_blas.cp314-win_arm64.pyd +0 -0
- scipy/linalg/cython_blas.pxd +169 -0
- scipy/linalg/cython_blas.pyx +1432 -0
- scipy/linalg/cython_lapack.cp314-win_arm64.lib +0 -0
- scipy/linalg/cython_lapack.cp314-win_arm64.pyd +0 -0
- scipy/linalg/cython_lapack.pxd +1528 -0
- scipy/linalg/cython_lapack.pyx +12045 -0
- scipy/linalg/decomp.py +23 -0
- scipy/linalg/decomp_cholesky.py +21 -0
- scipy/linalg/decomp_lu.py +21 -0
- scipy/linalg/decomp_qr.py +20 -0
- scipy/linalg/decomp_schur.py +21 -0
- scipy/linalg/decomp_svd.py +21 -0
- scipy/linalg/interpolative.py +989 -0
- scipy/linalg/lapack.py +1081 -0
- scipy/linalg/matfuncs.py +23 -0
- scipy/linalg/misc.py +21 -0
- scipy/linalg/special_matrices.py +22 -0
- scipy/linalg/tests/__init__.py +0 -0
- scipy/linalg/tests/_cython_examples/extending.pyx +23 -0
- scipy/linalg/tests/_cython_examples/meson.build +34 -0
- scipy/linalg/tests/data/carex_15_data.npz +0 -0
- scipy/linalg/tests/data/carex_18_data.npz +0 -0
- scipy/linalg/tests/data/carex_19_data.npz +0 -0
- scipy/linalg/tests/data/carex_20_data.npz +0 -0
- scipy/linalg/tests/data/carex_6_data.npz +0 -0
- scipy/linalg/tests/data/gendare_20170120_data.npz +0 -0
- scipy/linalg/tests/test_basic.py +2074 -0
- scipy/linalg/tests/test_batch.py +588 -0
- scipy/linalg/tests/test_blas.py +1127 -0
- scipy/linalg/tests/test_cython_blas.py +118 -0
- scipy/linalg/tests/test_cython_lapack.py +22 -0
- scipy/linalg/tests/test_cythonized_array_utils.py +130 -0
- scipy/linalg/tests/test_decomp.py +3189 -0
- scipy/linalg/tests/test_decomp_cholesky.py +268 -0
- scipy/linalg/tests/test_decomp_cossin.py +314 -0
- scipy/linalg/tests/test_decomp_ldl.py +137 -0
- scipy/linalg/tests/test_decomp_lu.py +308 -0
- scipy/linalg/tests/test_decomp_polar.py +110 -0
- scipy/linalg/tests/test_decomp_update.py +1701 -0
- scipy/linalg/tests/test_extending.py +46 -0
- scipy/linalg/tests/test_fblas.py +607 -0
- scipy/linalg/tests/test_interpolative.py +232 -0
- scipy/linalg/tests/test_lapack.py +3620 -0
- scipy/linalg/tests/test_matfuncs.py +1125 -0
- scipy/linalg/tests/test_matmul_toeplitz.py +136 -0
- scipy/linalg/tests/test_procrustes.py +214 -0
- scipy/linalg/tests/test_sketches.py +118 -0
- scipy/linalg/tests/test_solve_toeplitz.py +150 -0
- scipy/linalg/tests/test_solvers.py +844 -0
- scipy/linalg/tests/test_special_matrices.py +636 -0
- scipy/misc/__init__.py +6 -0
- scipy/misc/common.py +6 -0
- scipy/misc/doccer.py +6 -0
- scipy/ndimage/__init__.py +174 -0
- scipy/ndimage/_ctest.cp314-win_arm64.lib +0 -0
- scipy/ndimage/_ctest.cp314-win_arm64.pyd +0 -0
- scipy/ndimage/_cytest.cp314-win_arm64.lib +0 -0
- scipy/ndimage/_cytest.cp314-win_arm64.pyd +0 -0
- scipy/ndimage/_delegators.py +303 -0
- scipy/ndimage/_filters.py +2422 -0
- scipy/ndimage/_fourier.py +306 -0
- scipy/ndimage/_interpolation.py +1033 -0
- scipy/ndimage/_measurements.py +1689 -0
- scipy/ndimage/_morphology.py +2634 -0
- scipy/ndimage/_nd_image.cp314-win_arm64.lib +0 -0
- scipy/ndimage/_nd_image.cp314-win_arm64.pyd +0 -0
- scipy/ndimage/_ndimage_api.py +16 -0
- scipy/ndimage/_ni_docstrings.py +214 -0
- scipy/ndimage/_ni_label.cp314-win_arm64.lib +0 -0
- scipy/ndimage/_ni_label.cp314-win_arm64.pyd +0 -0
- scipy/ndimage/_ni_support.py +139 -0
- scipy/ndimage/_rank_filter_1d.cp314-win_arm64.lib +0 -0
- scipy/ndimage/_rank_filter_1d.cp314-win_arm64.pyd +0 -0
- scipy/ndimage/_support_alternative_backends.py +84 -0
- scipy/ndimage/filters.py +27 -0
- scipy/ndimage/fourier.py +21 -0
- scipy/ndimage/interpolation.py +22 -0
- scipy/ndimage/measurements.py +24 -0
- scipy/ndimage/morphology.py +27 -0
- scipy/ndimage/tests/__init__.py +12 -0
- scipy/ndimage/tests/data/label_inputs.txt +21 -0
- scipy/ndimage/tests/data/label_results.txt +294 -0
- scipy/ndimage/tests/data/label_strels.txt +42 -0
- scipy/ndimage/tests/dots.png +0 -0
- scipy/ndimage/tests/test_c_api.py +102 -0
- scipy/ndimage/tests/test_datatypes.py +67 -0
- scipy/ndimage/tests/test_filters.py +3083 -0
- scipy/ndimage/tests/test_fourier.py +187 -0
- scipy/ndimage/tests/test_interpolation.py +1491 -0
- scipy/ndimage/tests/test_measurements.py +1592 -0
- scipy/ndimage/tests/test_morphology.py +2950 -0
- scipy/ndimage/tests/test_ni_support.py +78 -0
- scipy/ndimage/tests/test_splines.py +70 -0
- scipy/odr/__init__.py +131 -0
- scipy/odr/__odrpack.cp314-win_arm64.lib +0 -0
- scipy/odr/__odrpack.cp314-win_arm64.pyd +0 -0
- scipy/odr/_add_newdocs.py +34 -0
- scipy/odr/_models.py +315 -0
- scipy/odr/_odrpack.py +1154 -0
- scipy/odr/models.py +20 -0
- scipy/odr/odrpack.py +21 -0
- scipy/odr/tests/__init__.py +0 -0
- scipy/odr/tests/test_odr.py +607 -0
- scipy/optimize/__init__.pxd +1 -0
- scipy/optimize/__init__.py +460 -0
- scipy/optimize/_basinhopping.py +741 -0
- scipy/optimize/_bglu_dense.cp314-win_arm64.lib +0 -0
- scipy/optimize/_bglu_dense.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_bracket.py +706 -0
- scipy/optimize/_chandrupatla.py +551 -0
- scipy/optimize/_cobyla_py.py +297 -0
- scipy/optimize/_cobyqa_py.py +72 -0
- scipy/optimize/_constraints.py +598 -0
- scipy/optimize/_dcsrch.py +728 -0
- scipy/optimize/_differentiable_functions.py +835 -0
- scipy/optimize/_differentialevolution.py +1970 -0
- scipy/optimize/_direct.cp314-win_arm64.lib +0 -0
- scipy/optimize/_direct.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_direct_py.py +280 -0
- scipy/optimize/_dual_annealing.py +732 -0
- scipy/optimize/_elementwise.py +798 -0
- scipy/optimize/_group_columns.cp314-win_arm64.lib +0 -0
- scipy/optimize/_group_columns.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_hessian_update_strategy.py +479 -0
- scipy/optimize/_highspy/__init__.py +0 -0
- scipy/optimize/_highspy/_core.cp314-win_arm64.lib +0 -0
- scipy/optimize/_highspy/_core.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_highspy/_highs_options.cp314-win_arm64.lib +0 -0
- scipy/optimize/_highspy/_highs_options.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_highspy/_highs_wrapper.py +338 -0
- scipy/optimize/_isotonic.py +157 -0
- scipy/optimize/_lbfgsb.cp314-win_arm64.lib +0 -0
- scipy/optimize/_lbfgsb.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_lbfgsb_py.py +634 -0
- scipy/optimize/_linesearch.py +896 -0
- scipy/optimize/_linprog.py +733 -0
- scipy/optimize/_linprog_doc.py +1434 -0
- scipy/optimize/_linprog_highs.py +422 -0
- scipy/optimize/_linprog_ip.py +1141 -0
- scipy/optimize/_linprog_rs.py +572 -0
- scipy/optimize/_linprog_simplex.py +663 -0
- scipy/optimize/_linprog_util.py +1521 -0
- scipy/optimize/_lsap.cp314-win_arm64.lib +0 -0
- scipy/optimize/_lsap.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_lsq/__init__.py +5 -0
- scipy/optimize/_lsq/bvls.py +183 -0
- scipy/optimize/_lsq/common.py +731 -0
- scipy/optimize/_lsq/dogbox.py +345 -0
- scipy/optimize/_lsq/givens_elimination.cp314-win_arm64.lib +0 -0
- scipy/optimize/_lsq/givens_elimination.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_lsq/least_squares.py +1044 -0
- scipy/optimize/_lsq/lsq_linear.py +361 -0
- scipy/optimize/_lsq/trf.py +587 -0
- scipy/optimize/_lsq/trf_linear.py +249 -0
- scipy/optimize/_milp.py +394 -0
- scipy/optimize/_minimize.py +1199 -0
- scipy/optimize/_minpack.cp314-win_arm64.lib +0 -0
- scipy/optimize/_minpack.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_minpack_py.py +1178 -0
- scipy/optimize/_moduleTNC.cp314-win_arm64.lib +0 -0
- scipy/optimize/_moduleTNC.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_nnls.py +96 -0
- scipy/optimize/_nonlin.py +1634 -0
- scipy/optimize/_numdiff.py +963 -0
- scipy/optimize/_optimize.py +4169 -0
- scipy/optimize/_pava_pybind.cp314-win_arm64.lib +0 -0
- scipy/optimize/_pava_pybind.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_qap.py +760 -0
- scipy/optimize/_remove_redundancy.py +522 -0
- scipy/optimize/_root.py +732 -0
- scipy/optimize/_root_scalar.py +538 -0
- scipy/optimize/_shgo.py +1606 -0
- scipy/optimize/_shgo_lib/__init__.py +0 -0
- scipy/optimize/_shgo_lib/_complex.py +1225 -0
- scipy/optimize/_shgo_lib/_vertex.py +460 -0
- scipy/optimize/_slsqp_py.py +603 -0
- scipy/optimize/_slsqplib.cp314-win_arm64.lib +0 -0
- scipy/optimize/_slsqplib.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_spectral.py +260 -0
- scipy/optimize/_tnc.py +438 -0
- scipy/optimize/_trlib/__init__.py +12 -0
- scipy/optimize/_trlib/_trlib.cp314-win_arm64.lib +0 -0
- scipy/optimize/_trlib/_trlib.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_trustregion.py +318 -0
- scipy/optimize/_trustregion_constr/__init__.py +6 -0
- scipy/optimize/_trustregion_constr/canonical_constraint.py +390 -0
- scipy/optimize/_trustregion_constr/equality_constrained_sqp.py +231 -0
- scipy/optimize/_trustregion_constr/minimize_trustregion_constr.py +584 -0
- scipy/optimize/_trustregion_constr/projections.py +411 -0
- scipy/optimize/_trustregion_constr/qp_subproblem.py +637 -0
- scipy/optimize/_trustregion_constr/report.py +49 -0
- scipy/optimize/_trustregion_constr/tests/__init__.py +0 -0
- scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py +296 -0
- scipy/optimize/_trustregion_constr/tests/test_nested_minimize.py +39 -0
- scipy/optimize/_trustregion_constr/tests/test_projections.py +214 -0
- scipy/optimize/_trustregion_constr/tests/test_qp_subproblem.py +645 -0
- scipy/optimize/_trustregion_constr/tests/test_report.py +34 -0
- scipy/optimize/_trustregion_constr/tr_interior_point.py +361 -0
- scipy/optimize/_trustregion_dogleg.py +122 -0
- scipy/optimize/_trustregion_exact.py +437 -0
- scipy/optimize/_trustregion_krylov.py +65 -0
- scipy/optimize/_trustregion_ncg.py +126 -0
- scipy/optimize/_tstutils.py +972 -0
- scipy/optimize/_zeros.cp314-win_arm64.lib +0 -0
- scipy/optimize/_zeros.cp314-win_arm64.pyd +0 -0
- scipy/optimize/_zeros_py.py +1475 -0
- scipy/optimize/cobyla.py +19 -0
- scipy/optimize/cython_optimize/__init__.py +133 -0
- scipy/optimize/cython_optimize/_zeros.cp314-win_arm64.lib +0 -0
- scipy/optimize/cython_optimize/_zeros.cp314-win_arm64.pyd +0 -0
- scipy/optimize/cython_optimize/_zeros.pxd +33 -0
- scipy/optimize/cython_optimize/c_zeros.pxd +26 -0
- scipy/optimize/cython_optimize.pxd +11 -0
- scipy/optimize/elementwise.py +38 -0
- scipy/optimize/lbfgsb.py +23 -0
- scipy/optimize/linesearch.py +18 -0
- scipy/optimize/minpack.py +27 -0
- scipy/optimize/minpack2.py +17 -0
- scipy/optimize/moduleTNC.py +19 -0
- scipy/optimize/nonlin.py +29 -0
- scipy/optimize/optimize.py +40 -0
- scipy/optimize/slsqp.py +22 -0
- scipy/optimize/tests/__init__.py +0 -0
- scipy/optimize/tests/_cython_examples/extending.pyx +43 -0
- scipy/optimize/tests/_cython_examples/meson.build +32 -0
- scipy/optimize/tests/test__basinhopping.py +535 -0
- scipy/optimize/tests/test__differential_evolution.py +1703 -0
- scipy/optimize/tests/test__dual_annealing.py +416 -0
- scipy/optimize/tests/test__linprog_clean_inputs.py +312 -0
- scipy/optimize/tests/test__numdiff.py +885 -0
- scipy/optimize/tests/test__remove_redundancy.py +228 -0
- scipy/optimize/tests/test__root.py +124 -0
- scipy/optimize/tests/test__shgo.py +1164 -0
- scipy/optimize/tests/test__spectral.py +226 -0
- scipy/optimize/tests/test_bracket.py +896 -0
- scipy/optimize/tests/test_chandrupatla.py +982 -0
- scipy/optimize/tests/test_cobyla.py +195 -0
- scipy/optimize/tests/test_cobyqa.py +252 -0
- scipy/optimize/tests/test_constraint_conversion.py +286 -0
- scipy/optimize/tests/test_constraints.py +255 -0
- scipy/optimize/tests/test_cython_optimize.py +92 -0
- scipy/optimize/tests/test_differentiable_functions.py +1025 -0
- scipy/optimize/tests/test_direct.py +321 -0
- scipy/optimize/tests/test_extending.py +28 -0
- scipy/optimize/tests/test_hessian_update_strategy.py +300 -0
- scipy/optimize/tests/test_isotonic_regression.py +167 -0
- scipy/optimize/tests/test_lbfgsb_hessinv.py +65 -0
- scipy/optimize/tests/test_lbfgsb_setulb.py +122 -0
- scipy/optimize/tests/test_least_squares.py +986 -0
- scipy/optimize/tests/test_linear_assignment.py +116 -0
- scipy/optimize/tests/test_linesearch.py +328 -0
- scipy/optimize/tests/test_linprog.py +2577 -0
- scipy/optimize/tests/test_lsq_common.py +297 -0
- scipy/optimize/tests/test_lsq_linear.py +287 -0
- scipy/optimize/tests/test_milp.py +459 -0
- scipy/optimize/tests/test_minimize_constrained.py +845 -0
- scipy/optimize/tests/test_minpack.py +1194 -0
- scipy/optimize/tests/test_nnls.py +469 -0
- scipy/optimize/tests/test_nonlin.py +572 -0
- scipy/optimize/tests/test_optimize.py +3344 -0
- scipy/optimize/tests/test_quadratic_assignment.py +455 -0
- scipy/optimize/tests/test_regression.py +40 -0
- scipy/optimize/tests/test_slsqp.py +645 -0
- scipy/optimize/tests/test_tnc.py +345 -0
- scipy/optimize/tests/test_trustregion.py +110 -0
- scipy/optimize/tests/test_trustregion_exact.py +351 -0
- scipy/optimize/tests/test_trustregion_krylov.py +170 -0
- scipy/optimize/tests/test_zeros.py +998 -0
- scipy/optimize/tnc.py +22 -0
- scipy/optimize/zeros.py +26 -0
- scipy/signal/__init__.py +316 -0
- scipy/signal/_arraytools.py +264 -0
- scipy/signal/_czt.py +575 -0
- scipy/signal/_delegators.py +568 -0
- scipy/signal/_filter_design.py +5893 -0
- scipy/signal/_fir_filter_design.py +1458 -0
- scipy/signal/_lti_conversion.py +534 -0
- scipy/signal/_ltisys.py +3546 -0
- scipy/signal/_max_len_seq.py +139 -0
- scipy/signal/_max_len_seq_inner.cp314-win_arm64.lib +0 -0
- scipy/signal/_max_len_seq_inner.cp314-win_arm64.pyd +0 -0
- scipy/signal/_peak_finding.py +1310 -0
- scipy/signal/_peak_finding_utils.cp314-win_arm64.lib +0 -0
- scipy/signal/_peak_finding_utils.cp314-win_arm64.pyd +0 -0
- scipy/signal/_polyutils.py +172 -0
- scipy/signal/_savitzky_golay.py +357 -0
- scipy/signal/_short_time_fft.py +2228 -0
- scipy/signal/_signal_api.py +30 -0
- scipy/signal/_signaltools.py +5309 -0
- scipy/signal/_sigtools.cp314-win_arm64.lib +0 -0
- scipy/signal/_sigtools.cp314-win_arm64.pyd +0 -0
- scipy/signal/_sosfilt.cp314-win_arm64.lib +0 -0
- scipy/signal/_sosfilt.cp314-win_arm64.pyd +0 -0
- scipy/signal/_spectral_py.py +2471 -0
- scipy/signal/_spline.cp314-win_arm64.lib +0 -0
- scipy/signal/_spline.cp314-win_arm64.pyd +0 -0
- scipy/signal/_spline.pyi +34 -0
- scipy/signal/_spline_filters.py +848 -0
- scipy/signal/_support_alternative_backends.py +73 -0
- scipy/signal/_upfirdn.py +219 -0
- scipy/signal/_upfirdn_apply.cp314-win_arm64.lib +0 -0
- scipy/signal/_upfirdn_apply.cp314-win_arm64.pyd +0 -0
- scipy/signal/_waveforms.py +687 -0
- scipy/signal/_wavelets.py +29 -0
- scipy/signal/bsplines.py +21 -0
- scipy/signal/filter_design.py +28 -0
- scipy/signal/fir_filter_design.py +21 -0
- scipy/signal/lti_conversion.py +20 -0
- scipy/signal/ltisys.py +25 -0
- scipy/signal/signaltools.py +27 -0
- scipy/signal/spectral.py +21 -0
- scipy/signal/spline.py +18 -0
- scipy/signal/tests/__init__.py +0 -0
- scipy/signal/tests/_scipy_spectral_test_shim.py +311 -0
- scipy/signal/tests/mpsig.py +122 -0
- scipy/signal/tests/test_array_tools.py +111 -0
- scipy/signal/tests/test_bsplines.py +365 -0
- scipy/signal/tests/test_cont2discrete.py +424 -0
- scipy/signal/tests/test_czt.py +221 -0
- scipy/signal/tests/test_dltisys.py +599 -0
- scipy/signal/tests/test_filter_design.py +4744 -0
- scipy/signal/tests/test_fir_filter_design.py +851 -0
- scipy/signal/tests/test_ltisys.py +1225 -0
- scipy/signal/tests/test_max_len_seq.py +71 -0
- scipy/signal/tests/test_peak_finding.py +915 -0
- scipy/signal/tests/test_result_type.py +51 -0
- scipy/signal/tests/test_savitzky_golay.py +363 -0
- scipy/signal/tests/test_short_time_fft.py +1107 -0
- scipy/signal/tests/test_signaltools.py +4735 -0
- scipy/signal/tests/test_spectral.py +2141 -0
- scipy/signal/tests/test_splines.py +427 -0
- scipy/signal/tests/test_upfirdn.py +322 -0
- scipy/signal/tests/test_waveforms.py +400 -0
- scipy/signal/tests/test_wavelets.py +59 -0
- scipy/signal/tests/test_windows.py +987 -0
- scipy/signal/waveforms.py +20 -0
- scipy/signal/wavelets.py +17 -0
- scipy/signal/windows/__init__.py +52 -0
- scipy/signal/windows/_windows.py +2513 -0
- scipy/signal/windows/windows.py +23 -0
- scipy/sparse/__init__.py +350 -0
- scipy/sparse/_base.py +1613 -0
- scipy/sparse/_bsr.py +880 -0
- scipy/sparse/_compressed.py +1328 -0
- scipy/sparse/_construct.py +1454 -0
- scipy/sparse/_coo.py +1581 -0
- scipy/sparse/_csc.py +367 -0
- scipy/sparse/_csparsetools.cp314-win_arm64.lib +0 -0
- scipy/sparse/_csparsetools.cp314-win_arm64.pyd +0 -0
- scipy/sparse/_csr.py +558 -0
- scipy/sparse/_data.py +569 -0
- scipy/sparse/_dia.py +677 -0
- scipy/sparse/_dok.py +669 -0
- scipy/sparse/_extract.py +178 -0
- scipy/sparse/_index.py +444 -0
- scipy/sparse/_lil.py +632 -0
- scipy/sparse/_matrix.py +169 -0
- scipy/sparse/_matrix_io.py +167 -0
- scipy/sparse/_sparsetools.cp314-win_arm64.lib +0 -0
- scipy/sparse/_sparsetools.cp314-win_arm64.pyd +0 -0
- scipy/sparse/_spfuncs.py +76 -0
- scipy/sparse/_sputils.py +632 -0
- scipy/sparse/base.py +24 -0
- scipy/sparse/bsr.py +22 -0
- scipy/sparse/compressed.py +20 -0
- scipy/sparse/construct.py +38 -0
- scipy/sparse/coo.py +23 -0
- scipy/sparse/csc.py +22 -0
- scipy/sparse/csgraph/__init__.py +210 -0
- scipy/sparse/csgraph/_flow.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_flow.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_laplacian.py +563 -0
- scipy/sparse/csgraph/_matching.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_matching.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_min_spanning_tree.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_min_spanning_tree.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_reordering.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_reordering.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_shortest_path.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_shortest_path.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_tools.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_tools.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_traversal.cp314-win_arm64.lib +0 -0
- scipy/sparse/csgraph/_traversal.cp314-win_arm64.pyd +0 -0
- scipy/sparse/csgraph/_validation.py +66 -0
- scipy/sparse/csgraph/tests/__init__.py +0 -0
- scipy/sparse/csgraph/tests/test_connected_components.py +119 -0
- scipy/sparse/csgraph/tests/test_conversions.py +61 -0
- scipy/sparse/csgraph/tests/test_flow.py +209 -0
- scipy/sparse/csgraph/tests/test_graph_laplacian.py +368 -0
- scipy/sparse/csgraph/tests/test_matching.py +307 -0
- scipy/sparse/csgraph/tests/test_pydata_sparse.py +197 -0
- scipy/sparse/csgraph/tests/test_reordering.py +70 -0
- scipy/sparse/csgraph/tests/test_shortest_path.py +540 -0
- scipy/sparse/csgraph/tests/test_spanning_tree.py +66 -0
- scipy/sparse/csgraph/tests/test_traversal.py +148 -0
- scipy/sparse/csr.py +22 -0
- scipy/sparse/data.py +18 -0
- scipy/sparse/dia.py +22 -0
- scipy/sparse/dok.py +22 -0
- scipy/sparse/extract.py +23 -0
- scipy/sparse/lil.py +22 -0
- scipy/sparse/linalg/__init__.py +148 -0
- scipy/sparse/linalg/_dsolve/__init__.py +71 -0
- scipy/sparse/linalg/_dsolve/_add_newdocs.py +147 -0
- scipy/sparse/linalg/_dsolve/_superlu.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_dsolve/_superlu.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_dsolve/linsolve.py +882 -0
- scipy/sparse/linalg/_dsolve/tests/__init__.py +0 -0
- scipy/sparse/linalg/_dsolve/tests/test_linsolve.py +928 -0
- scipy/sparse/linalg/_eigen/__init__.py +22 -0
- scipy/sparse/linalg/_eigen/_svds.py +540 -0
- scipy/sparse/linalg/_eigen/_svds_doc.py +382 -0
- scipy/sparse/linalg/_eigen/arpack/COPYING +45 -0
- scipy/sparse/linalg/_eigen/arpack/__init__.py +20 -0
- scipy/sparse/linalg/_eigen/arpack/_arpack.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_eigen/arpack/_arpack.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_eigen/arpack/arpack.py +1706 -0
- scipy/sparse/linalg/_eigen/arpack/tests/__init__.py +0 -0
- scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py +717 -0
- scipy/sparse/linalg/_eigen/lobpcg/__init__.py +16 -0
- scipy/sparse/linalg/_eigen/lobpcg/lobpcg.py +1110 -0
- scipy/sparse/linalg/_eigen/lobpcg/tests/__init__.py +0 -0
- scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py +725 -0
- scipy/sparse/linalg/_eigen/tests/__init__.py +0 -0
- scipy/sparse/linalg/_eigen/tests/test_svds.py +886 -0
- scipy/sparse/linalg/_expm_multiply.py +816 -0
- scipy/sparse/linalg/_interface.py +920 -0
- scipy/sparse/linalg/_isolve/__init__.py +20 -0
- scipy/sparse/linalg/_isolve/_gcrotmk.py +503 -0
- scipy/sparse/linalg/_isolve/iterative.py +1051 -0
- scipy/sparse/linalg/_isolve/lgmres.py +230 -0
- scipy/sparse/linalg/_isolve/lsmr.py +486 -0
- scipy/sparse/linalg/_isolve/lsqr.py +589 -0
- scipy/sparse/linalg/_isolve/minres.py +372 -0
- scipy/sparse/linalg/_isolve/tests/__init__.py +0 -0
- scipy/sparse/linalg/_isolve/tests/test_gcrotmk.py +183 -0
- scipy/sparse/linalg/_isolve/tests/test_iterative.py +809 -0
- scipy/sparse/linalg/_isolve/tests/test_lgmres.py +225 -0
- scipy/sparse/linalg/_isolve/tests/test_lsmr.py +185 -0
- scipy/sparse/linalg/_isolve/tests/test_lsqr.py +120 -0
- scipy/sparse/linalg/_isolve/tests/test_minres.py +97 -0
- scipy/sparse/linalg/_isolve/tests/test_utils.py +9 -0
- scipy/sparse/linalg/_isolve/tfqmr.py +179 -0
- scipy/sparse/linalg/_isolve/utils.py +121 -0
- scipy/sparse/linalg/_matfuncs.py +940 -0
- scipy/sparse/linalg/_norm.py +195 -0
- scipy/sparse/linalg/_onenormest.py +467 -0
- scipy/sparse/linalg/_propack/_cpropack.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_propack/_cpropack.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_propack/_dpropack.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_propack/_dpropack.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_propack/_spropack.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_propack/_spropack.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_propack/_zpropack.cp314-win_arm64.lib +0 -0
- scipy/sparse/linalg/_propack/_zpropack.cp314-win_arm64.pyd +0 -0
- scipy/sparse/linalg/_special_sparse_arrays.py +949 -0
- scipy/sparse/linalg/_svdp.py +309 -0
- scipy/sparse/linalg/dsolve.py +22 -0
- scipy/sparse/linalg/eigen.py +21 -0
- scipy/sparse/linalg/interface.py +20 -0
- scipy/sparse/linalg/isolve.py +22 -0
- scipy/sparse/linalg/matfuncs.py +18 -0
- scipy/sparse/linalg/tests/__init__.py +0 -0
- scipy/sparse/linalg/tests/propack_test_data.npz +0 -0
- scipy/sparse/linalg/tests/test_expm_multiply.py +367 -0
- scipy/sparse/linalg/tests/test_interface.py +561 -0
- scipy/sparse/linalg/tests/test_matfuncs.py +592 -0
- scipy/sparse/linalg/tests/test_norm.py +154 -0
- scipy/sparse/linalg/tests/test_onenormest.py +252 -0
- scipy/sparse/linalg/tests/test_propack.py +165 -0
- scipy/sparse/linalg/tests/test_pydata_sparse.py +272 -0
- scipy/sparse/linalg/tests/test_special_sparse_arrays.py +337 -0
- scipy/sparse/sparsetools.py +17 -0
- scipy/sparse/spfuncs.py +17 -0
- scipy/sparse/sputils.py +17 -0
- scipy/sparse/tests/__init__.py +0 -0
- scipy/sparse/tests/data/csc_py2.npz +0 -0
- scipy/sparse/tests/data/csc_py3.npz +0 -0
- scipy/sparse/tests/test_arithmetic1d.py +341 -0
- scipy/sparse/tests/test_array_api.py +561 -0
- scipy/sparse/tests/test_base.py +5870 -0
- scipy/sparse/tests/test_common1d.py +447 -0
- scipy/sparse/tests/test_construct.py +872 -0
- scipy/sparse/tests/test_coo.py +1119 -0
- scipy/sparse/tests/test_csc.py +98 -0
- scipy/sparse/tests/test_csr.py +214 -0
- scipy/sparse/tests/test_dok.py +209 -0
- scipy/sparse/tests/test_extract.py +51 -0
- scipy/sparse/tests/test_indexing1d.py +603 -0
- scipy/sparse/tests/test_matrix_io.py +109 -0
- scipy/sparse/tests/test_minmax1d.py +128 -0
- scipy/sparse/tests/test_sparsetools.py +344 -0
- scipy/sparse/tests/test_spfuncs.py +97 -0
- scipy/sparse/tests/test_sputils.py +424 -0
- scipy/spatial/__init__.py +129 -0
- scipy/spatial/_ckdtree.cp314-win_arm64.lib +0 -0
- scipy/spatial/_ckdtree.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_distance_pybind.cp314-win_arm64.lib +0 -0
- scipy/spatial/_distance_pybind.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_distance_wrap.cp314-win_arm64.lib +0 -0
- scipy/spatial/_distance_wrap.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_geometric_slerp.py +238 -0
- scipy/spatial/_hausdorff.cp314-win_arm64.lib +0 -0
- scipy/spatial/_hausdorff.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_kdtree.py +920 -0
- scipy/spatial/_plotutils.py +274 -0
- scipy/spatial/_procrustes.py +132 -0
- scipy/spatial/_qhull.cp314-win_arm64.lib +0 -0
- scipy/spatial/_qhull.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_qhull.pyi +213 -0
- scipy/spatial/_spherical_voronoi.py +341 -0
- scipy/spatial/_voronoi.cp314-win_arm64.lib +0 -0
- scipy/spatial/_voronoi.cp314-win_arm64.pyd +0 -0
- scipy/spatial/_voronoi.pyi +4 -0
- scipy/spatial/ckdtree.py +18 -0
- scipy/spatial/distance.py +3147 -0
- scipy/spatial/distance.pyi +210 -0
- scipy/spatial/kdtree.py +25 -0
- scipy/spatial/qhull.py +25 -0
- scipy/spatial/qhull_src/COPYING_QHULL.txt +39 -0
- scipy/spatial/tests/__init__.py +0 -0
- scipy/spatial/tests/data/cdist-X1.txt +10 -0
- scipy/spatial/tests/data/cdist-X2.txt +20 -0
- scipy/spatial/tests/data/degenerate_pointset.npz +0 -0
- scipy/spatial/tests/data/iris.txt +150 -0
- scipy/spatial/tests/data/pdist-boolean-inp.txt +20 -0
- scipy/spatial/tests/data/pdist-chebyshev-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-chebyshev-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-cityblock-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-cityblock-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-correlation-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-correlation-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-cosine-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-cosine-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-double-inp.txt +20 -0
- scipy/spatial/tests/data/pdist-euclidean-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-euclidean-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-hamming-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-jaccard-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-jensenshannon-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-jensenshannon-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-minkowski-3.2-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-minkowski-3.2-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-minkowski-5.8-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-seuclidean-ml-iris.txt +1 -0
- scipy/spatial/tests/data/pdist-seuclidean-ml.txt +1 -0
- scipy/spatial/tests/data/pdist-spearman-ml.txt +1 -0
- scipy/spatial/tests/data/random-bool-data.txt +100 -0
- scipy/spatial/tests/data/random-double-data.txt +100 -0
- scipy/spatial/tests/data/random-int-data.txt +100 -0
- scipy/spatial/tests/data/random-uint-data.txt +100 -0
- scipy/spatial/tests/data/selfdual-4d-polytope.txt +27 -0
- scipy/spatial/tests/test__plotutils.py +91 -0
- scipy/spatial/tests/test__procrustes.py +116 -0
- scipy/spatial/tests/test_distance.py +2389 -0
- scipy/spatial/tests/test_hausdorff.py +199 -0
- scipy/spatial/tests/test_kdtree.py +1536 -0
- scipy/spatial/tests/test_qhull.py +1313 -0
- scipy/spatial/tests/test_slerp.py +417 -0
- scipy/spatial/tests/test_spherical_voronoi.py +358 -0
- scipy/spatial/transform/__init__.py +31 -0
- scipy/spatial/transform/_rigid_transform.cp314-win_arm64.lib +0 -0
- scipy/spatial/transform/_rigid_transform.cp314-win_arm64.pyd +0 -0
- scipy/spatial/transform/_rotation.cp314-win_arm64.lib +0 -0
- scipy/spatial/transform/_rotation.cp314-win_arm64.pyd +0 -0
- scipy/spatial/transform/_rotation_groups.py +140 -0
- scipy/spatial/transform/_rotation_spline.py +460 -0
- scipy/spatial/transform/rotation.py +21 -0
- scipy/spatial/transform/tests/__init__.py +0 -0
- scipy/spatial/transform/tests/test_rigid_transform.py +1221 -0
- scipy/spatial/transform/tests/test_rotation.py +2569 -0
- scipy/spatial/transform/tests/test_rotation_groups.py +169 -0
- scipy/spatial/transform/tests/test_rotation_spline.py +183 -0
- scipy/special/__init__.pxd +1 -0
- scipy/special/__init__.py +841 -0
- scipy/special/_add_newdocs.py +9961 -0
- scipy/special/_basic.py +3576 -0
- scipy/special/_comb.cp314-win_arm64.lib +0 -0
- scipy/special/_comb.cp314-win_arm64.pyd +0 -0
- scipy/special/_ellip_harm.py +214 -0
- scipy/special/_ellip_harm_2.cp314-win_arm64.lib +0 -0
- scipy/special/_ellip_harm_2.cp314-win_arm64.pyd +0 -0
- scipy/special/_gufuncs.cp314-win_arm64.lib +0 -0
- scipy/special/_gufuncs.cp314-win_arm64.pyd +0 -0
- scipy/special/_input_validation.py +17 -0
- scipy/special/_lambertw.py +149 -0
- scipy/special/_logsumexp.py +426 -0
- scipy/special/_mptestutils.py +453 -0
- scipy/special/_multiufuncs.py +610 -0
- scipy/special/_orthogonal.py +2592 -0
- scipy/special/_orthogonal.pyi +330 -0
- scipy/special/_precompute/__init__.py +0 -0
- scipy/special/_precompute/cosine_cdf.py +17 -0
- scipy/special/_precompute/expn_asy.py +54 -0
- scipy/special/_precompute/gammainc_asy.py +116 -0
- scipy/special/_precompute/gammainc_data.py +124 -0
- scipy/special/_precompute/hyp2f1_data.py +484 -0
- scipy/special/_precompute/lambertw.py +68 -0
- scipy/special/_precompute/loggamma.py +43 -0
- scipy/special/_precompute/struve_convergence.py +131 -0
- scipy/special/_precompute/utils.py +38 -0
- scipy/special/_precompute/wright_bessel.py +342 -0
- scipy/special/_precompute/wright_bessel_data.py +152 -0
- scipy/special/_precompute/wrightomega.py +41 -0
- scipy/special/_precompute/zetac.py +27 -0
- scipy/special/_sf_error.py +15 -0
- scipy/special/_specfun.cp314-win_arm64.lib +0 -0
- scipy/special/_specfun.cp314-win_arm64.pyd +0 -0
- scipy/special/_special_ufuncs.cp314-win_arm64.lib +0 -0
- scipy/special/_special_ufuncs.cp314-win_arm64.pyd +0 -0
- scipy/special/_spfun_stats.py +106 -0
- scipy/special/_spherical_bessel.py +397 -0
- scipy/special/_support_alternative_backends.py +295 -0
- scipy/special/_test_internal.cp314-win_arm64.lib +0 -0
- scipy/special/_test_internal.cp314-win_arm64.pyd +0 -0
- scipy/special/_test_internal.pyi +9 -0
- scipy/special/_testutils.py +321 -0
- scipy/special/_ufuncs.cp314-win_arm64.lib +0 -0
- scipy/special/_ufuncs.cp314-win_arm64.pyd +0 -0
- scipy/special/_ufuncs.pyi +522 -0
- scipy/special/_ufuncs.pyx +13173 -0
- scipy/special/_ufuncs_cxx.cp314-win_arm64.lib +0 -0
- scipy/special/_ufuncs_cxx.cp314-win_arm64.pyd +0 -0
- scipy/special/_ufuncs_cxx.pxd +142 -0
- scipy/special/_ufuncs_cxx.pyx +427 -0
- scipy/special/_ufuncs_cxx_defs.h +147 -0
- scipy/special/_ufuncs_defs.h +57 -0
- scipy/special/add_newdocs.py +15 -0
- scipy/special/basic.py +87 -0
- scipy/special/cython_special.cp314-win_arm64.lib +0 -0
- scipy/special/cython_special.cp314-win_arm64.pyd +0 -0
- scipy/special/cython_special.pxd +259 -0
- scipy/special/cython_special.pyi +3 -0
- scipy/special/orthogonal.py +45 -0
- scipy/special/sf_error.py +20 -0
- scipy/special/specfun.py +24 -0
- scipy/special/spfun_stats.py +17 -0
- scipy/special/tests/__init__.py +0 -0
- scipy/special/tests/_cython_examples/extending.pyx +12 -0
- scipy/special/tests/_cython_examples/meson.build +34 -0
- scipy/special/tests/data/__init__.py +0 -0
- scipy/special/tests/data/boost.npz +0 -0
- scipy/special/tests/data/gsl.npz +0 -0
- scipy/special/tests/data/local.npz +0 -0
- scipy/special/tests/test_basic.py +4815 -0
- scipy/special/tests/test_bdtr.py +112 -0
- scipy/special/tests/test_boost_ufuncs.py +64 -0
- scipy/special/tests/test_boxcox.py +125 -0
- scipy/special/tests/test_cdflib.py +712 -0
- scipy/special/tests/test_cdft_asymptotic.py +49 -0
- scipy/special/tests/test_cephes_intp_cast.py +29 -0
- scipy/special/tests/test_cosine_distr.py +83 -0
- scipy/special/tests/test_cython_special.py +363 -0
- scipy/special/tests/test_data.py +719 -0
- scipy/special/tests/test_dd.py +42 -0
- scipy/special/tests/test_digamma.py +45 -0
- scipy/special/tests/test_ellip_harm.py +278 -0
- scipy/special/tests/test_erfinv.py +89 -0
- scipy/special/tests/test_exponential_integrals.py +118 -0
- scipy/special/tests/test_extending.py +28 -0
- scipy/special/tests/test_faddeeva.py +85 -0
- scipy/special/tests/test_gamma.py +12 -0
- scipy/special/tests/test_gammainc.py +152 -0
- scipy/special/tests/test_hyp2f1.py +2566 -0
- scipy/special/tests/test_hypergeometric.py +234 -0
- scipy/special/tests/test_iv_ratio.py +249 -0
- scipy/special/tests/test_kolmogorov.py +491 -0
- scipy/special/tests/test_lambertw.py +109 -0
- scipy/special/tests/test_legendre.py +1518 -0
- scipy/special/tests/test_log1mexp.py +85 -0
- scipy/special/tests/test_loggamma.py +70 -0
- scipy/special/tests/test_logit.py +162 -0
- scipy/special/tests/test_logsumexp.py +469 -0
- scipy/special/tests/test_mpmath.py +2293 -0
- scipy/special/tests/test_nan_inputs.py +65 -0
- scipy/special/tests/test_ndtr.py +77 -0
- scipy/special/tests/test_ndtri_exp.py +94 -0
- scipy/special/tests/test_orthogonal.py +821 -0
- scipy/special/tests/test_orthogonal_eval.py +275 -0
- scipy/special/tests/test_owens_t.py +53 -0
- scipy/special/tests/test_pcf.py +24 -0
- scipy/special/tests/test_pdtr.py +48 -0
- scipy/special/tests/test_powm1.py +65 -0
- scipy/special/tests/test_precompute_expn_asy.py +24 -0
- scipy/special/tests/test_precompute_gammainc.py +108 -0
- scipy/special/tests/test_precompute_utils.py +36 -0
- scipy/special/tests/test_round.py +18 -0
- scipy/special/tests/test_sf_error.py +146 -0
- scipy/special/tests/test_sici.py +36 -0
- scipy/special/tests/test_specfun.py +48 -0
- scipy/special/tests/test_spence.py +32 -0
- scipy/special/tests/test_spfun_stats.py +61 -0
- scipy/special/tests/test_sph_harm.py +85 -0
- scipy/special/tests/test_spherical_bessel.py +400 -0
- scipy/special/tests/test_support_alternative_backends.py +248 -0
- scipy/special/tests/test_trig.py +72 -0
- scipy/special/tests/test_ufunc_signatures.py +46 -0
- scipy/special/tests/test_wright_bessel.py +205 -0
- scipy/special/tests/test_wrightomega.py +117 -0
- scipy/special/tests/test_zeta.py +301 -0
- scipy/stats/__init__.py +670 -0
- scipy/stats/_ansari_swilk_statistics.cp314-win_arm64.lib +0 -0
- scipy/stats/_ansari_swilk_statistics.cp314-win_arm64.pyd +0 -0
- scipy/stats/_axis_nan_policy.py +692 -0
- scipy/stats/_biasedurn.cp314-win_arm64.lib +0 -0
- scipy/stats/_biasedurn.cp314-win_arm64.pyd +0 -0
- scipy/stats/_biasedurn.pxd +27 -0
- scipy/stats/_binned_statistic.py +795 -0
- scipy/stats/_binomtest.py +375 -0
- scipy/stats/_bws_test.py +177 -0
- scipy/stats/_censored_data.py +459 -0
- scipy/stats/_common.py +5 -0
- scipy/stats/_constants.py +42 -0
- scipy/stats/_continued_fraction.py +387 -0
- scipy/stats/_continuous_distns.py +12486 -0
- scipy/stats/_correlation.py +210 -0
- scipy/stats/_covariance.py +636 -0
- scipy/stats/_crosstab.py +204 -0
- scipy/stats/_discrete_distns.py +2098 -0
- scipy/stats/_distn_infrastructure.py +4201 -0
- scipy/stats/_distr_params.py +299 -0
- scipy/stats/_distribution_infrastructure.py +5750 -0
- scipy/stats/_entropy.py +428 -0
- scipy/stats/_finite_differences.py +145 -0
- scipy/stats/_fit.py +1351 -0
- scipy/stats/_hypotests.py +2060 -0
- scipy/stats/_kde.py +732 -0
- scipy/stats/_ksstats.py +600 -0
- scipy/stats/_levy_stable/__init__.py +1231 -0
- scipy/stats/_levy_stable/levyst.cp314-win_arm64.lib +0 -0
- scipy/stats/_levy_stable/levyst.cp314-win_arm64.pyd +0 -0
- scipy/stats/_mannwhitneyu.py +492 -0
- scipy/stats/_mgc.py +550 -0
- scipy/stats/_morestats.py +4626 -0
- scipy/stats/_mstats_basic.py +3658 -0
- scipy/stats/_mstats_extras.py +521 -0
- scipy/stats/_multicomp.py +449 -0
- scipy/stats/_multivariate.py +7281 -0
- scipy/stats/_new_distributions.py +452 -0
- scipy/stats/_odds_ratio.py +466 -0
- scipy/stats/_page_trend_test.py +486 -0
- scipy/stats/_probability_distribution.py +1964 -0
- scipy/stats/_qmc.py +2956 -0
- scipy/stats/_qmc_cy.cp314-win_arm64.lib +0 -0
- scipy/stats/_qmc_cy.cp314-win_arm64.pyd +0 -0
- scipy/stats/_qmc_cy.pyi +54 -0
- scipy/stats/_qmvnt.py +454 -0
- scipy/stats/_qmvnt_cy.cp314-win_arm64.lib +0 -0
- scipy/stats/_qmvnt_cy.cp314-win_arm64.pyd +0 -0
- scipy/stats/_quantile.py +335 -0
- scipy/stats/_rcont/__init__.py +4 -0
- scipy/stats/_rcont/rcont.cp314-win_arm64.lib +0 -0
- scipy/stats/_rcont/rcont.cp314-win_arm64.pyd +0 -0
- scipy/stats/_relative_risk.py +263 -0
- scipy/stats/_resampling.py +2352 -0
- scipy/stats/_result_classes.py +40 -0
- scipy/stats/_sampling.py +1314 -0
- scipy/stats/_sensitivity_analysis.py +713 -0
- scipy/stats/_sobol.cp314-win_arm64.lib +0 -0
- scipy/stats/_sobol.cp314-win_arm64.pyd +0 -0
- scipy/stats/_sobol.pyi +54 -0
- scipy/stats/_sobol_direction_numbers.npz +0 -0
- scipy/stats/_stats.cp314-win_arm64.lib +0 -0
- scipy/stats/_stats.cp314-win_arm64.pyd +0 -0
- scipy/stats/_stats.pxd +10 -0
- scipy/stats/_stats_mstats_common.py +322 -0
- scipy/stats/_stats_py.py +11089 -0
- scipy/stats/_stats_pythran.cp314-win_arm64.lib +0 -0
- scipy/stats/_stats_pythran.cp314-win_arm64.pyd +0 -0
- scipy/stats/_survival.py +683 -0
- scipy/stats/_tukeylambda_stats.py +199 -0
- scipy/stats/_unuran/__init__.py +0 -0
- scipy/stats/_unuran/unuran_wrapper.cp314-win_arm64.lib +0 -0
- scipy/stats/_unuran/unuran_wrapper.cp314-win_arm64.pyd +0 -0
- scipy/stats/_unuran/unuran_wrapper.pyi +179 -0
- scipy/stats/_variation.py +126 -0
- scipy/stats/_warnings_errors.py +38 -0
- scipy/stats/_wilcoxon.py +265 -0
- scipy/stats/biasedurn.py +16 -0
- scipy/stats/contingency.py +521 -0
- scipy/stats/distributions.py +24 -0
- scipy/stats/kde.py +18 -0
- scipy/stats/morestats.py +27 -0
- scipy/stats/mstats.py +140 -0
- scipy/stats/mstats_basic.py +42 -0
- scipy/stats/mstats_extras.py +25 -0
- scipy/stats/mvn.py +17 -0
- scipy/stats/qmc.py +236 -0
- scipy/stats/sampling.py +73 -0
- scipy/stats/stats.py +41 -0
- scipy/stats/tests/__init__.py +0 -0
- scipy/stats/tests/common_tests.py +356 -0
- scipy/stats/tests/data/_mvt.py +171 -0
- scipy/stats/tests/data/fisher_exact_results_from_r.py +607 -0
- scipy/stats/tests/data/jf_skew_t_gamlss_pdf_data.npy +0 -0
- scipy/stats/tests/data/levy_stable/stable-Z1-cdf-sample-data.npy +0 -0
- scipy/stats/tests/data/levy_stable/stable-Z1-pdf-sample-data.npy +0 -0
- scipy/stats/tests/data/levy_stable/stable-loc-scale-sample-data.npy +0 -0
- scipy/stats/tests/data/nist_anova/AtmWtAg.dat +108 -0
- scipy/stats/tests/data/nist_anova/SiRstv.dat +85 -0
- scipy/stats/tests/data/nist_anova/SmLs01.dat +249 -0
- scipy/stats/tests/data/nist_anova/SmLs02.dat +1869 -0
- scipy/stats/tests/data/nist_anova/SmLs03.dat +18069 -0
- scipy/stats/tests/data/nist_anova/SmLs04.dat +249 -0
- scipy/stats/tests/data/nist_anova/SmLs05.dat +1869 -0
- scipy/stats/tests/data/nist_anova/SmLs06.dat +18069 -0
- scipy/stats/tests/data/nist_anova/SmLs07.dat +249 -0
- scipy/stats/tests/data/nist_anova/SmLs08.dat +1869 -0
- scipy/stats/tests/data/nist_anova/SmLs09.dat +18069 -0
- scipy/stats/tests/data/nist_linregress/Norris.dat +97 -0
- scipy/stats/tests/data/rel_breitwigner_pdf_sample_data_ROOT.npy +0 -0
- scipy/stats/tests/data/studentized_range_mpmath_ref.json +1499 -0
- scipy/stats/tests/test_axis_nan_policy.py +1388 -0
- scipy/stats/tests/test_binned_statistic.py +568 -0
- scipy/stats/tests/test_censored_data.py +152 -0
- scipy/stats/tests/test_contingency.py +294 -0
- scipy/stats/tests/test_continued_fraction.py +173 -0
- scipy/stats/tests/test_continuous.py +2198 -0
- scipy/stats/tests/test_continuous_basic.py +1053 -0
- scipy/stats/tests/test_continuous_fit_censored.py +683 -0
- scipy/stats/tests/test_correlation.py +80 -0
- scipy/stats/tests/test_crosstab.py +115 -0
- scipy/stats/tests/test_discrete_basic.py +580 -0
- scipy/stats/tests/test_discrete_distns.py +700 -0
- scipy/stats/tests/test_distributions.py +10413 -0
- scipy/stats/tests/test_entropy.py +322 -0
- scipy/stats/tests/test_fast_gen_inversion.py +435 -0
- scipy/stats/tests/test_fit.py +1090 -0
- scipy/stats/tests/test_hypotests.py +1991 -0
- scipy/stats/tests/test_kdeoth.py +676 -0
- scipy/stats/tests/test_marray.py +289 -0
- scipy/stats/tests/test_mgc.py +217 -0
- scipy/stats/tests/test_morestats.py +3259 -0
- scipy/stats/tests/test_mstats_basic.py +2071 -0
- scipy/stats/tests/test_mstats_extras.py +172 -0
- scipy/stats/tests/test_multicomp.py +405 -0
- scipy/stats/tests/test_multivariate.py +4381 -0
- scipy/stats/tests/test_odds_ratio.py +148 -0
- scipy/stats/tests/test_qmc.py +1492 -0
- scipy/stats/tests/test_quantile.py +199 -0
- scipy/stats/tests/test_rank.py +345 -0
- scipy/stats/tests/test_relative_risk.py +95 -0
- scipy/stats/tests/test_resampling.py +2000 -0
- scipy/stats/tests/test_sampling.py +1450 -0
- scipy/stats/tests/test_sensitivity_analysis.py +310 -0
- scipy/stats/tests/test_stats.py +9707 -0
- scipy/stats/tests/test_survival.py +466 -0
- scipy/stats/tests/test_tukeylambda_stats.py +85 -0
- scipy/stats/tests/test_variation.py +216 -0
- scipy/version.py +12 -0
- scipy-1.16.2.dist-info/DELVEWHEEL +2 -0
- scipy-1.16.2.dist-info/LICENSE.txt +912 -0
- scipy-1.16.2.dist-info/METADATA +1061 -0
- scipy-1.16.2.dist-info/RECORD +1530 -0
- scipy-1.16.2.dist-info/WHEEL +4 -0
- scipy.libs/msvcp140-5f1c5dd31916990d94181e07bc3afb32.dll +0 -0
- scipy.libs/scipy_openblas-f3ac85b1f412f7e86514c923dc4058d1.dll +0 -0
@@ -0,0 +1,1090 @@
|
|
1
|
+
import os
|
2
|
+
import numpy as np
|
3
|
+
import numpy.testing as npt
|
4
|
+
from numpy.testing import assert_allclose, assert_equal
|
5
|
+
import pytest
|
6
|
+
from scipy import stats
|
7
|
+
from scipy.optimize import differential_evolution
|
8
|
+
|
9
|
+
from .test_continuous_basic import distcont
|
10
|
+
from scipy.stats._distn_infrastructure import FitError
|
11
|
+
from scipy.stats._distr_params import distdiscrete
|
12
|
+
from scipy.stats import goodness_of_fit
|
13
|
+
|
14
|
+
|
15
|
+
# this is not a proper statistical test for convergence, but only
|
16
|
+
# verifies that the estimate and true values don't differ by too much
|
17
|
+
|
18
|
+
fit_sizes = [1000, 5000, 10000] # sample sizes to try
|
19
|
+
|
20
|
+
thresh_percent = 0.25 # percent of true parameters for fail cut-off
|
21
|
+
thresh_min = 0.75 # minimum difference estimate - true to fail test
|
22
|
+
|
23
|
+
mle_failing_fits = [
|
24
|
+
'dpareto_lognorm',
|
25
|
+
'gausshyper',
|
26
|
+
'genexpon',
|
27
|
+
'gengamma',
|
28
|
+
'irwinhall',
|
29
|
+
'kappa4',
|
30
|
+
'ksone',
|
31
|
+
'kstwo',
|
32
|
+
'ncf',
|
33
|
+
'ncx2',
|
34
|
+
'truncexpon',
|
35
|
+
'tukeylambda',
|
36
|
+
'vonmises',
|
37
|
+
'levy_stable',
|
38
|
+
'trapezoid',
|
39
|
+
'truncweibull_min',
|
40
|
+
'studentized_range',
|
41
|
+
]
|
42
|
+
|
43
|
+
# these pass but are XSLOW (>1s)
|
44
|
+
mle_Xslow_fits = ['betaprime', 'crystalball', 'exponweib', 'f', 'geninvgauss',
|
45
|
+
'jf_skew_t', 'nct', 'recipinvgauss', 'rel_breitwigner',
|
46
|
+
'vonmises_line']
|
47
|
+
|
48
|
+
# The MLE fit method of these distributions doesn't perform well when all
|
49
|
+
# parameters are fit, so test them with the location fixed at 0.
|
50
|
+
mle_use_floc0 = [
|
51
|
+
'burr',
|
52
|
+
'chi',
|
53
|
+
'chi2',
|
54
|
+
'mielke',
|
55
|
+
'pearson3',
|
56
|
+
'genhalflogistic',
|
57
|
+
'rdist',
|
58
|
+
'pareto',
|
59
|
+
'powerlaw', # distfn.nnlf(est2, rvs) > distfn.nnlf(est1, rvs) otherwise
|
60
|
+
'powerlognorm',
|
61
|
+
'wrapcauchy',
|
62
|
+
'rel_breitwigner',
|
63
|
+
]
|
64
|
+
|
65
|
+
mm_failing_fits = ['alpha', 'betaprime', 'burr', 'burr12', 'cauchy', 'chi',
|
66
|
+
'chi2', 'crystalball', 'dgamma', 'dpareto_lognorm', 'dweibull',
|
67
|
+
'f', 'fatiguelife', 'fisk', 'foldcauchy', 'genextreme',
|
68
|
+
'gengamma', 'genhyperbolic', 'gennorm', 'genpareto',
|
69
|
+
'halfcauchy', 'invgamma', 'invweibull', 'irwinhall', 'jf_skew_t',
|
70
|
+
'johnsonsu', 'kappa3', 'ksone', 'kstwo', 'landau', 'levy', 'levy_l',
|
71
|
+
'levy_stable', 'loglaplace', 'lomax', 'mielke', 'nakagami',
|
72
|
+
'ncf', 'nct', 'ncx2', 'pareto', 'powerlognorm', 'powernorm',
|
73
|
+
'rel_breitwigner', 'skewcauchy', 't', 'trapezoid', 'triang',
|
74
|
+
'truncpareto', 'truncweibull_min', 'tukeylambda',
|
75
|
+
'studentized_range']
|
76
|
+
|
77
|
+
# not sure if these fail, but they caused my patience to fail
|
78
|
+
mm_XXslow_fits = ['argus', 'exponpow', 'exponweib', 'gausshyper', 'genexpon',
|
79
|
+
'genhalflogistic', 'halfgennorm', 'gompertz', 'johnsonsb',
|
80
|
+
'kappa4', 'kstwobign', 'recipinvgauss',
|
81
|
+
'truncexpon', 'vonmises', 'vonmises_line']
|
82
|
+
|
83
|
+
# these pass but are XSLOW (>1s)
|
84
|
+
mm_Xslow_fits = ['wrapcauchy']
|
85
|
+
|
86
|
+
failing_fits = {"MM": mm_failing_fits + mm_XXslow_fits, "MLE": mle_failing_fits}
|
87
|
+
xslow_fits = {"MM": mm_Xslow_fits, "MLE": mle_Xslow_fits}
|
88
|
+
fail_interval_censored = {"truncpareto"}
|
89
|
+
|
90
|
+
# Don't run the fit test on these:
|
91
|
+
skip_fit = [
|
92
|
+
'erlang', # Subclass of gamma, generates a warning.
|
93
|
+
'genhyperbolic', 'norminvgauss', # too slow
|
94
|
+
]
|
95
|
+
|
96
|
+
|
97
|
+
def cases_test_cont_fit():
|
98
|
+
# this tests the closeness of the estimated parameters to the true
|
99
|
+
# parameters with fit method of continuous distributions
|
100
|
+
# Note: is slow, some distributions don't converge with sample
|
101
|
+
# size <= 10000
|
102
|
+
for distname, arg in distcont:
|
103
|
+
if distname not in skip_fit:
|
104
|
+
yield distname, arg
|
105
|
+
|
106
|
+
|
107
|
+
@pytest.mark.slow
|
108
|
+
@pytest.mark.parametrize('distname,arg', cases_test_cont_fit())
|
109
|
+
@pytest.mark.parametrize('method', ["MLE", "MM"])
|
110
|
+
def test_cont_fit(distname, arg, method):
|
111
|
+
run_xfail = int(os.getenv('SCIPY_XFAIL', default=False))
|
112
|
+
run_xslow = int(os.getenv('SCIPY_XSLOW', default=False))
|
113
|
+
|
114
|
+
if distname in failing_fits[method] and not run_xfail:
|
115
|
+
# The generic `fit` method can't be expected to work perfectly for all
|
116
|
+
# distributions, data, and guesses. Some failures are expected.
|
117
|
+
msg = "Failure expected; set environment variable SCIPY_XFAIL=1 to run."
|
118
|
+
pytest.xfail(msg)
|
119
|
+
|
120
|
+
if distname in xslow_fits[method] and not run_xslow:
|
121
|
+
msg = "Very slow; set environment variable SCIPY_XSLOW=1 to run."
|
122
|
+
pytest.skip(msg)
|
123
|
+
|
124
|
+
distfn = getattr(stats, distname)
|
125
|
+
|
126
|
+
truearg = np.hstack([arg, [0.0, 1.0]])
|
127
|
+
diffthreshold = np.max(np.vstack([truearg*thresh_percent,
|
128
|
+
np.full(distfn.numargs+2, thresh_min)]),
|
129
|
+
0)
|
130
|
+
|
131
|
+
for fit_size in fit_sizes:
|
132
|
+
# Note that if a fit succeeds, the other fit_sizes are skipped
|
133
|
+
rng = np.random.default_rng(1234)
|
134
|
+
|
135
|
+
with np.errstate(all='ignore'):
|
136
|
+
rvs = distfn.rvs(size=fit_size, *arg, random_state=rng)
|
137
|
+
if method == 'MLE' and distfn.name in mle_use_floc0:
|
138
|
+
kwds = {'floc': 0}
|
139
|
+
else:
|
140
|
+
kwds = {}
|
141
|
+
# start with default values
|
142
|
+
est = distfn.fit(rvs, method=method, **kwds)
|
143
|
+
if method == 'MLE':
|
144
|
+
# Trivial test of the use of CensoredData. The fit() method
|
145
|
+
# will check that data contains no actual censored data, and
|
146
|
+
# do a regular uncensored fit.
|
147
|
+
data1 = stats.CensoredData(rvs)
|
148
|
+
est1 = distfn.fit(data1, **kwds)
|
149
|
+
msg = ('Different results fitting uncensored data wrapped as'
|
150
|
+
f' CensoredData: {distfn.name}: est={est} est1={est1}')
|
151
|
+
assert_allclose(est1, est, rtol=1e-10, err_msg=msg)
|
152
|
+
if method == 'MLE' and distname not in fail_interval_censored:
|
153
|
+
# Convert the first `nic` values in rvs to interval-censored
|
154
|
+
# values. The interval is small, so est2 should be close to
|
155
|
+
# est.
|
156
|
+
nic = 15
|
157
|
+
interval = np.column_stack((rvs, rvs))
|
158
|
+
interval[:nic, 0] *= 0.99
|
159
|
+
interval[:nic, 1] *= 1.01
|
160
|
+
interval.sort(axis=1)
|
161
|
+
data2 = stats.CensoredData(interval=interval)
|
162
|
+
est2 = distfn.fit(data2, **kwds)
|
163
|
+
msg = ('Different results fitting interval-censored'
|
164
|
+
f' data: {distfn.name}: est={est} est2={est2}')
|
165
|
+
assert_allclose(est2, est, rtol=0.05, err_msg=msg)
|
166
|
+
|
167
|
+
diff = est - truearg
|
168
|
+
|
169
|
+
# threshold for location
|
170
|
+
diffthreshold[-2] = np.max([np.abs(rvs.mean())*thresh_percent,
|
171
|
+
thresh_min])
|
172
|
+
|
173
|
+
if np.any(np.isnan(est)):
|
174
|
+
raise AssertionError('nan returned in fit')
|
175
|
+
else:
|
176
|
+
if np.all(np.abs(diff) <= diffthreshold):
|
177
|
+
break
|
178
|
+
else:
|
179
|
+
txt = f'parameter: {str(truearg)}\n'
|
180
|
+
txt += f'estimated: {str(est)}\n'
|
181
|
+
txt += f'diff : {str(diff)}\n'
|
182
|
+
raise AssertionError(f'fit not very good in {distfn.name}\n' + txt)
|
183
|
+
|
184
|
+
|
185
|
+
def _check_loc_scale_mle_fit(name, data, desired, atol=None):
|
186
|
+
d = getattr(stats, name)
|
187
|
+
actual = d.fit(data)[-2:]
|
188
|
+
assert_allclose(actual, desired, atol=atol,
|
189
|
+
err_msg=f'poor mle fit of (loc, scale) in {name}')
|
190
|
+
|
191
|
+
|
192
|
+
def test_non_default_loc_scale_mle_fit():
|
193
|
+
data = np.array([1.01, 1.78, 1.78, 1.78, 1.88, 1.88, 1.88, 2.00])
|
194
|
+
_check_loc_scale_mle_fit('uniform', data, [1.01, 0.99], 1e-3)
|
195
|
+
_check_loc_scale_mle_fit('expon', data, [1.01, 0.73875], 1e-3)
|
196
|
+
|
197
|
+
|
198
|
+
def test_expon_fit():
|
199
|
+
"""gh-6167"""
|
200
|
+
data = [0, 0, 0, 0, 2, 2, 2, 2]
|
201
|
+
phat = stats.expon.fit(data, floc=0)
|
202
|
+
assert_allclose(phat, [0, 1.0], atol=1e-3)
|
203
|
+
|
204
|
+
|
205
|
+
def test_fit_error():
|
206
|
+
data = np.concatenate([np.zeros(29), np.ones(21)])
|
207
|
+
message = "Optimization converged to parameters that are..."
|
208
|
+
with pytest.raises(FitError, match=message), \
|
209
|
+
pytest.warns(RuntimeWarning):
|
210
|
+
stats.beta.fit(data)
|
211
|
+
|
212
|
+
|
213
|
+
@pytest.mark.parametrize("dist, params",
|
214
|
+
[(stats.norm, (0.5, 2.5)), # type: ignore[attr-defined]
|
215
|
+
(stats.binom, (10, 0.3, 2))]) # type: ignore[attr-defined]
|
216
|
+
def test_nnlf_and_related_methods(dist, params):
|
217
|
+
rng = np.random.default_rng(983459824)
|
218
|
+
|
219
|
+
if hasattr(dist, 'pdf'):
|
220
|
+
logpxf = dist.logpdf
|
221
|
+
else:
|
222
|
+
logpxf = dist.logpmf
|
223
|
+
|
224
|
+
x = dist.rvs(*params, size=100, random_state=rng)
|
225
|
+
ref = -logpxf(x, *params).sum()
|
226
|
+
res1 = dist.nnlf(params, x)
|
227
|
+
res2 = dist._penalized_nnlf(params, x)
|
228
|
+
assert_allclose(res1, ref)
|
229
|
+
assert_allclose(res2, ref)
|
230
|
+
|
231
|
+
|
232
|
+
def cases_test_fit_mle():
|
233
|
+
# These fail default test or hang
|
234
|
+
skip_basic_fit = {'argus', 'irwinhall', 'foldnorm', 'truncpareto',
|
235
|
+
'truncweibull_min', 'ksone', 'levy_stable',
|
236
|
+
'studentized_range', 'kstwo',
|
237
|
+
'beta', 'nakagami', 'truncnorm', # don't meet tolerance
|
238
|
+
'poisson_binom'} # vector-valued shape parameter
|
239
|
+
|
240
|
+
# Please keep this list in alphabetical order...
|
241
|
+
slow_basic_fit = {'alpha', 'arcsine', 'betaprime', 'binom', 'bradford', 'burr12',
|
242
|
+
'chi', 'crystalball', 'dweibull', 'erlang', 'exponnorm',
|
243
|
+
'exponpow', 'f', 'fatiguelife', 'fisk', 'foldcauchy', 'gamma',
|
244
|
+
'genexpon', 'genextreme', 'gennorm', 'genpareto',
|
245
|
+
'gompertz', 'halfgennorm', 'invgamma', 'invgauss', 'invweibull',
|
246
|
+
'jf_skew_t', 'johnsonsb', 'johnsonsu', 'kappa3',
|
247
|
+
'kstwobign', 'loglaplace', 'lognorm', 'lomax', 'mielke',
|
248
|
+
'nbinom', 'norminvgauss',
|
249
|
+
'pareto', 'pearson3', 'powerlaw', 'powernorm',
|
250
|
+
'randint', 'rdist', 'recipinvgauss', 'rice', 'skewnorm',
|
251
|
+
't', 'uniform', 'weibull_max', 'weibull_min', 'wrapcauchy'}
|
252
|
+
|
253
|
+
# Please keep this list in alphabetical order...
|
254
|
+
xslow_basic_fit = {'betabinom', 'betanbinom', 'burr', 'dpareto_lognorm',
|
255
|
+
'exponweib', 'gausshyper', 'gengamma', 'genhalflogistic',
|
256
|
+
'genhyperbolic', 'geninvgauss',
|
257
|
+
'hypergeom', 'kappa4', 'loguniform',
|
258
|
+
'ncf', 'nchypergeom_fisher', 'nchypergeom_wallenius',
|
259
|
+
'nct', 'ncx2', 'nhypergeom',
|
260
|
+
'powerlognorm', 'reciprocal', 'rel_breitwigner',
|
261
|
+
'skellam', 'trapezoid', 'triang',
|
262
|
+
'tukeylambda', 'vonmises', 'zipfian'}
|
263
|
+
|
264
|
+
for dist in dict(distdiscrete + distcont):
|
265
|
+
if dist in skip_basic_fit or not isinstance(dist, str):
|
266
|
+
reason = "tested separately"
|
267
|
+
yield pytest.param(dist, marks=pytest.mark.skip(reason=reason))
|
268
|
+
elif dist in slow_basic_fit:
|
269
|
+
reason = "too slow (>= 0.25s)"
|
270
|
+
yield pytest.param(dist, marks=pytest.mark.slow(reason=reason))
|
271
|
+
elif dist in xslow_basic_fit:
|
272
|
+
reason = "too slow (>= 1.0s)"
|
273
|
+
yield pytest.param(dist, marks=pytest.mark.xslow(reason=reason))
|
274
|
+
else:
|
275
|
+
yield dist
|
276
|
+
|
277
|
+
|
278
|
+
def cases_test_fit_mse():
|
279
|
+
# the first four are so slow that I'm not sure whether they would pass
|
280
|
+
skip_basic_fit = {'levy_stable', 'studentized_range', 'ksone', 'skewnorm',
|
281
|
+
'irwinhall', # hangs
|
282
|
+
'norminvgauss', # super slow (~1 hr) but passes
|
283
|
+
'kstwo', # very slow (~25 min) but passes
|
284
|
+
'geninvgauss', # quite slow (~4 minutes) but passes
|
285
|
+
'gausshyper', 'genhyperbolic', # integration warnings
|
286
|
+
'tukeylambda', # close, but doesn't meet tolerance
|
287
|
+
'vonmises', # can have negative CDF; doesn't play nice
|
288
|
+
'arcsine', 'argus', 'powerlaw', 'rdist', # don't meet tolerance
|
289
|
+
'poisson_binom', # vector-valued shape parameter
|
290
|
+
}
|
291
|
+
|
292
|
+
# Please keep this list in alphabetical order...
|
293
|
+
slow_basic_fit = {'alpha', 'anglit', 'betabinom', 'bradford',
|
294
|
+
'chi', 'chi2', 'crystalball', 'dweibull',
|
295
|
+
'erlang', 'exponnorm', 'exponpow', 'exponweib',
|
296
|
+
'fatiguelife', 'fisk', 'foldcauchy', 'foldnorm',
|
297
|
+
'gamma', 'genexpon', 'genextreme', 'genhalflogistic',
|
298
|
+
'genlogistic', 'genpareto', 'gompertz',
|
299
|
+
'hypergeom', 'invweibull',
|
300
|
+
'johnsonsu', 'kappa3', 'kstwobign',
|
301
|
+
'laplace_asymmetric', 'loggamma', 'loglaplace',
|
302
|
+
'lognorm', 'lomax',
|
303
|
+
'maxwell', 'nhypergeom',
|
304
|
+
'pareto', 'powernorm', 'randint', 'recipinvgauss',
|
305
|
+
'semicircular',
|
306
|
+
't', 'triang', 'truncexpon', 'truncpareto',
|
307
|
+
'uniform',
|
308
|
+
'wald', 'weibull_max', 'weibull_min', 'wrapcauchy'}
|
309
|
+
|
310
|
+
# Please keep this list in alphabetical order...
|
311
|
+
xslow_basic_fit = {'argus', 'beta', 'betaprime', 'burr', 'burr12',
|
312
|
+
'dgamma', 'dpareto_lognorm', 'f', 'gengamma', 'gennorm',
|
313
|
+
'halfgennorm', 'invgamma', 'invgauss', 'jf_skew_t',
|
314
|
+
'johnsonsb', 'kappa4', 'loguniform', 'mielke',
|
315
|
+
'nakagami', 'ncf', 'nchypergeom_fisher',
|
316
|
+
'nchypergeom_wallenius', 'nct', 'ncx2',
|
317
|
+
'pearson3', 'powerlognorm',
|
318
|
+
'reciprocal', 'rel_breitwigner', 'rice',
|
319
|
+
'trapezoid', 'truncnorm', 'truncweibull_min',
|
320
|
+
'vonmises_line', 'zipfian'}
|
321
|
+
|
322
|
+
warns_basic_fit = {'skellam'} # can remove mark after gh-14901 is resolved
|
323
|
+
|
324
|
+
for dist in dict(distdiscrete + distcont):
|
325
|
+
if dist in skip_basic_fit or not isinstance(dist, str):
|
326
|
+
reason = "Fails. Oh well."
|
327
|
+
yield pytest.param(dist, marks=pytest.mark.skip(reason=reason))
|
328
|
+
elif dist in slow_basic_fit:
|
329
|
+
reason = "too slow (>= 0.25s)"
|
330
|
+
yield pytest.param(dist, marks=pytest.mark.slow(reason=reason))
|
331
|
+
elif dist in xslow_basic_fit:
|
332
|
+
reason = "too slow (>= 1.0s)"
|
333
|
+
yield pytest.param(dist, marks=pytest.mark.xslow(reason=reason))
|
334
|
+
elif dist in warns_basic_fit:
|
335
|
+
mark = pytest.mark.filterwarnings('ignore::RuntimeWarning')
|
336
|
+
yield pytest.param(dist, marks=mark)
|
337
|
+
else:
|
338
|
+
yield dist
|
339
|
+
|
340
|
+
|
341
|
+
def cases_test_fitstart():
|
342
|
+
for distname, shapes in dict(distcont).items():
|
343
|
+
if (not isinstance(distname, str) or
|
344
|
+
distname in {'studentized_range', 'recipinvgauss'}): # slow
|
345
|
+
continue
|
346
|
+
yield distname, shapes
|
347
|
+
|
348
|
+
|
349
|
+
@pytest.mark.parametrize('distname, shapes', cases_test_fitstart())
|
350
|
+
def test_fitstart(distname, shapes):
|
351
|
+
dist = getattr(stats, distname)
|
352
|
+
rng = np.random.default_rng(216342614)
|
353
|
+
data = rng.random(10)
|
354
|
+
|
355
|
+
with np.errstate(invalid='ignore', divide='ignore'): # irrelevant to test
|
356
|
+
guess = dist._fitstart(data)
|
357
|
+
|
358
|
+
assert dist._argcheck(*guess[:-2])
|
359
|
+
|
360
|
+
|
361
|
+
def assert_nlff_less_or_close(dist, data, params1, params0, rtol=1e-7, atol=0,
|
362
|
+
nlff_name='nnlf'):
|
363
|
+
nlff = getattr(dist, nlff_name)
|
364
|
+
nlff1 = nlff(params1, data)
|
365
|
+
nlff0 = nlff(params0, data)
|
366
|
+
if not (nlff1 < nlff0):
|
367
|
+
np.testing.assert_allclose(nlff1, nlff0, rtol=rtol, atol=atol)
|
368
|
+
|
369
|
+
|
370
|
+
class TestFit:
|
371
|
+
dist = stats.binom # type: ignore[attr-defined]
|
372
|
+
seed = 654634816187
|
373
|
+
rng = np.random.default_rng(seed)
|
374
|
+
data = stats.binom.rvs(5, 0.5, size=100, random_state=rng) # type: ignore[attr-defined] # noqa: E501
|
375
|
+
shape_bounds_a = [(1, 10), (0, 1)]
|
376
|
+
shape_bounds_d = {'n': (1, 10), 'p': (0, 1)}
|
377
|
+
atol = 5e-2
|
378
|
+
rtol = 1e-2
|
379
|
+
tols = {'atol': atol, 'rtol': rtol}
|
380
|
+
|
381
|
+
def opt(self, *args, rng=1, **kwds):
|
382
|
+
return differential_evolution(*args, rng=rng, **kwds)
|
383
|
+
|
384
|
+
def test_dist_iv(self):
|
385
|
+
message = "`dist` must be an instance of..."
|
386
|
+
with pytest.raises(ValueError, match=message):
|
387
|
+
stats.fit(10, self.data, self.shape_bounds_a)
|
388
|
+
|
389
|
+
def test_data_iv(self):
|
390
|
+
message = "`data` must be exactly one-dimensional."
|
391
|
+
with pytest.raises(ValueError, match=message):
|
392
|
+
stats.fit(self.dist, [[1, 2, 3]], self.shape_bounds_a)
|
393
|
+
|
394
|
+
message = "All elements of `data` must be finite numbers."
|
395
|
+
with pytest.raises(ValueError, match=message):
|
396
|
+
stats.fit(self.dist, [1, 2, 3, np.nan], self.shape_bounds_a)
|
397
|
+
with pytest.raises(ValueError, match=message):
|
398
|
+
stats.fit(self.dist, [1, 2, 3, np.inf], self.shape_bounds_a)
|
399
|
+
with pytest.raises(ValueError, match=message):
|
400
|
+
stats.fit(self.dist, ['1', '2', '3'], self.shape_bounds_a)
|
401
|
+
|
402
|
+
def test_bounds_iv(self):
|
403
|
+
message = "Bounds provided for the following unrecognized..."
|
404
|
+
shape_bounds = {'n': (1, 10), 'p': (0, 1), '1': (0, 10)}
|
405
|
+
with pytest.warns(RuntimeWarning, match=message):
|
406
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
407
|
+
|
408
|
+
message = "Each element of a `bounds` sequence must be a tuple..."
|
409
|
+
shape_bounds = [(1, 10, 3), (0, 1)]
|
410
|
+
with pytest.raises(ValueError, match=message):
|
411
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
412
|
+
|
413
|
+
message = "Each element of `bounds` must be a tuple specifying..."
|
414
|
+
shape_bounds = [(1, 10, 3), (0, 1, 0.5)]
|
415
|
+
with pytest.raises(ValueError, match=message):
|
416
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
417
|
+
shape_bounds = [1, 0]
|
418
|
+
with pytest.raises(ValueError, match=message):
|
419
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
420
|
+
|
421
|
+
message = "A `bounds` sequence must contain at least 2 elements..."
|
422
|
+
shape_bounds = [(1, 10)]
|
423
|
+
with pytest.raises(ValueError, match=message):
|
424
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
425
|
+
|
426
|
+
message = "A `bounds` sequence may not contain more than 3 elements..."
|
427
|
+
bounds = [(1, 10), (1, 10), (1, 10), (1, 10)]
|
428
|
+
with pytest.raises(ValueError, match=message):
|
429
|
+
stats.fit(self.dist, self.data, bounds)
|
430
|
+
|
431
|
+
message = "There are no values for `p` on the interval..."
|
432
|
+
shape_bounds = {'n': (1, 10), 'p': (1, 0)}
|
433
|
+
with pytest.raises(ValueError, match=message):
|
434
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
435
|
+
|
436
|
+
message = "There are no values for `n` on the interval..."
|
437
|
+
shape_bounds = [(10, 1), (0, 1)]
|
438
|
+
with pytest.raises(ValueError, match=message):
|
439
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
440
|
+
|
441
|
+
message = "There are no integer values for `n` on the interval..."
|
442
|
+
shape_bounds = [(1.4, 1.6), (0, 1)]
|
443
|
+
with pytest.raises(ValueError, match=message):
|
444
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
445
|
+
|
446
|
+
message = "The intersection of user-provided bounds for `n`"
|
447
|
+
with pytest.raises(ValueError, match=message):
|
448
|
+
stats.fit(self.dist, self.data)
|
449
|
+
shape_bounds = [(-np.inf, np.inf), (0, 1)]
|
450
|
+
with pytest.raises(ValueError, match=message):
|
451
|
+
stats.fit(self.dist, self.data, shape_bounds)
|
452
|
+
|
453
|
+
def test_guess_iv(self):
|
454
|
+
message = "Guesses provided for the following unrecognized..."
|
455
|
+
guess = {'n': 1, 'p': 0.5, '1': 255}
|
456
|
+
with pytest.warns(RuntimeWarning, match=message):
|
457
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
458
|
+
|
459
|
+
message = "Each element of `guess` must be a scalar..."
|
460
|
+
guess = {'n': 1, 'p': 'hi'}
|
461
|
+
with pytest.raises(ValueError, match=message):
|
462
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
463
|
+
guess = [1, 'f']
|
464
|
+
with pytest.raises(ValueError, match=message):
|
465
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
466
|
+
guess = [[1, 2]]
|
467
|
+
with pytest.raises(ValueError, match=message):
|
468
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
469
|
+
|
470
|
+
message = "A `guess` sequence must contain at least 2..."
|
471
|
+
guess = [1]
|
472
|
+
with pytest.raises(ValueError, match=message):
|
473
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
474
|
+
|
475
|
+
message = "A `guess` sequence may not contain more than 3..."
|
476
|
+
guess = [1, 2, 3, 4]
|
477
|
+
with pytest.raises(ValueError, match=message):
|
478
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
479
|
+
|
480
|
+
message = "Guess for parameter `n` rounded.*|Guess for parameter `p` clipped.*"
|
481
|
+
guess = {'n': 4.5, 'p': -0.5}
|
482
|
+
with pytest.warns(RuntimeWarning, match=message):
|
483
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
484
|
+
|
485
|
+
message = "Guess for parameter `loc` rounded..."
|
486
|
+
guess = [5, 0.5, 0.5]
|
487
|
+
with pytest.warns(RuntimeWarning, match=message):
|
488
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
489
|
+
|
490
|
+
message = "Guess for parameter `p` clipped..."
|
491
|
+
guess = {'n': 5, 'p': -0.5}
|
492
|
+
with pytest.warns(RuntimeWarning, match=message):
|
493
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
494
|
+
|
495
|
+
message = "Guess for parameter `loc` clipped..."
|
496
|
+
guess = [5, 0.5, 1]
|
497
|
+
with pytest.warns(RuntimeWarning, match=message):
|
498
|
+
stats.fit(self.dist, self.data, self.shape_bounds_d, guess=guess)
|
499
|
+
|
500
|
+
def basic_fit_test(self, dist_name, method, rng=1):
|
501
|
+
|
502
|
+
N = 5000
|
503
|
+
dist_data = dict(distcont + distdiscrete)
|
504
|
+
rng = np.random.default_rng(self.seed)
|
505
|
+
dist = getattr(stats, dist_name)
|
506
|
+
shapes = np.array(dist_data[dist_name])
|
507
|
+
bounds = np.empty((len(shapes) + 2, 2), dtype=np.float64)
|
508
|
+
bounds[:-2, 0] = shapes/10.**np.sign(shapes)
|
509
|
+
bounds[:-2, 1] = shapes*10.**np.sign(shapes)
|
510
|
+
bounds[-2] = (0, 10)
|
511
|
+
bounds[-1] = (1e-16, 10)
|
512
|
+
loc = rng.uniform(*bounds[-2])
|
513
|
+
scale = rng.uniform(*bounds[-1])
|
514
|
+
ref = list(dist_data[dist_name]) + [loc, scale]
|
515
|
+
|
516
|
+
if getattr(dist, 'pmf', False):
|
517
|
+
ref = ref[:-1]
|
518
|
+
ref[-1] = np.floor(loc)
|
519
|
+
data = dist.rvs(*ref, size=N, random_state=rng)
|
520
|
+
bounds = bounds[:-1]
|
521
|
+
if getattr(dist, 'pdf', False):
|
522
|
+
data = dist.rvs(*ref, size=N, random_state=rng)
|
523
|
+
|
524
|
+
with npt.suppress_warnings() as sup:
|
525
|
+
sup.filter(RuntimeWarning, "overflow encountered")
|
526
|
+
res = stats.fit(dist, data, bounds, method=method,
|
527
|
+
optimizer=self.opt)
|
528
|
+
|
529
|
+
nlff_names = {'mle': 'nnlf', 'mse': '_penalized_nlpsf'}
|
530
|
+
nlff_name = nlff_names[method]
|
531
|
+
assert_nlff_less_or_close(dist, data, res.params, ref, **self.tols,
|
532
|
+
nlff_name=nlff_name)
|
533
|
+
|
534
|
+
@pytest.mark.parametrize("dist_name", cases_test_fit_mle())
|
535
|
+
def test_basic_fit_mle(self, dist_name):
|
536
|
+
self.basic_fit_test(dist_name, "mle", rng=5)
|
537
|
+
|
538
|
+
@pytest.mark.parametrize("dist_name", cases_test_fit_mse())
|
539
|
+
def test_basic_fit_mse(self, dist_name):
|
540
|
+
self.basic_fit_test(dist_name, "mse", rng=2)
|
541
|
+
|
542
|
+
@pytest.mark.slow
|
543
|
+
def test_arcsine(self):
|
544
|
+
# Can't guarantee that all distributions will fit all data with
|
545
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
546
|
+
# Try something slightly different.
|
547
|
+
N = 1000
|
548
|
+
rng = np.random.default_rng(self.seed)
|
549
|
+
dist = stats.arcsine
|
550
|
+
shapes = (1., 2.)
|
551
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
552
|
+
shape_bounds = {'loc': (0.1, 10), 'scale': (0.1, 10)}
|
553
|
+
res = stats.fit(dist, data, shape_bounds, method='mse', optimizer=self.opt)
|
554
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes,
|
555
|
+
nlff_name='_penalized_nlpsf', **self.tols)
|
556
|
+
|
557
|
+
@pytest.mark.parametrize("method", ('mle', 'mse'))
|
558
|
+
def test_argus(self, method):
|
559
|
+
# Can't guarantee that all distributions will fit all data with
|
560
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
561
|
+
# Try something slightly different.
|
562
|
+
N = 1000
|
563
|
+
rng = np.random.default_rng(self.seed)
|
564
|
+
dist = stats.argus
|
565
|
+
shapes = (1., 2., 3.)
|
566
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
567
|
+
shape_bounds = {'chi': (0.1, 10), 'loc': (0.1, 10), 'scale': (0.1, 10)}
|
568
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt, method=method)
|
569
|
+
nlff_name = {'mle': 'nnlf', 'mse': '_penalized_nlpsf'}[method]
|
570
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes, **self.tols,
|
571
|
+
nlff_name=nlff_name)
|
572
|
+
|
573
|
+
@pytest.mark.xslow
|
574
|
+
def test_beta(self):
|
575
|
+
# Can't guarantee that all distributions will fit all data with
|
576
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
577
|
+
# Try something slightly different.
|
578
|
+
N = 1000
|
579
|
+
rng = np.random.default_rng(self.seed)
|
580
|
+
dist = stats.beta
|
581
|
+
shapes = (2.3098496451481823, 0.62687954300963677, 1., 2.)
|
582
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
583
|
+
shape_bounds = {'a': (0.1, 10), 'b':(0.1, 10),
|
584
|
+
'loc': (0.1, 10), 'scale': (0.1, 10)}
|
585
|
+
res = stats.fit(dist, data, shape_bounds, method='mle', optimizer=self.opt)
|
586
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes,
|
587
|
+
nlff_name='nnlf', **self.tols)
|
588
|
+
|
589
|
+
def test_foldnorm(self):
|
590
|
+
# Can't guarantee that all distributions will fit all data with
|
591
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
592
|
+
# Try something slightly different.
|
593
|
+
N = 1000
|
594
|
+
rng = np.random.default_rng(self.seed)
|
595
|
+
dist = stats.foldnorm
|
596
|
+
shapes = (1.952125337355587, 2., 3.)
|
597
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
598
|
+
shape_bounds = {'c': (0.1, 10), 'loc': (0.1, 10), 'scale': (0.1, 10)}
|
599
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt)
|
600
|
+
|
601
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes, **self.tols)
|
602
|
+
|
603
|
+
def test_nakagami(self):
|
604
|
+
# Can't guarantee that all distributions will fit all data with
|
605
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
606
|
+
# Try something slightly different.
|
607
|
+
N = 1000
|
608
|
+
rng = np.random.default_rng(self.seed)
|
609
|
+
dist = stats.nakagami
|
610
|
+
shapes = (4.9673794866666237, 1., 2.)
|
611
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
612
|
+
shape_bounds = {'nu':(0.1, 10), 'loc': (0.1, 10), 'scale': (0.1, 10)}
|
613
|
+
res = stats.fit(dist, data, shape_bounds, method='mle', optimizer=self.opt)
|
614
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes,
|
615
|
+
nlff_name='nnlf', **self.tols)
|
616
|
+
|
617
|
+
@pytest.mark.slow
|
618
|
+
def test_powerlaw(self):
|
619
|
+
# Can't guarantee that all distributions will fit all data with
|
620
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
621
|
+
# Try something slightly different.
|
622
|
+
N = 1000
|
623
|
+
rng = np.random.default_rng(self.seed)
|
624
|
+
dist = stats.powerlaw
|
625
|
+
shapes = (1.6591133289905851, 1., 2.)
|
626
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
627
|
+
shape_bounds = {'a': (0.1, 10), 'loc': (0.1, 10), 'scale': (0.1, 10)}
|
628
|
+
res = stats.fit(dist, data, shape_bounds, method='mse', optimizer=self.opt)
|
629
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes,
|
630
|
+
nlff_name='_penalized_nlpsf', **self.tols)
|
631
|
+
|
632
|
+
def test_truncpareto(self):
|
633
|
+
# Can't guarantee that all distributions will fit all data with
|
634
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
635
|
+
# Try something slightly different.
|
636
|
+
N = 1000
|
637
|
+
rng = np.random.default_rng(self.seed)
|
638
|
+
dist = stats.truncpareto
|
639
|
+
shapes = (1.8, 5.3, 2.3, 4.1)
|
640
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
641
|
+
shape_bounds = [(0.1, 10)]*4
|
642
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt)
|
643
|
+
|
644
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes, **self.tols)
|
645
|
+
|
646
|
+
@pytest.mark.slow
|
647
|
+
def test_truncweibull_min(self):
|
648
|
+
# Can't guarantee that all distributions will fit all data with
|
649
|
+
# arbitrary bounds. This distribution just happens to fail above.
|
650
|
+
# Try something slightly different.
|
651
|
+
N = 1000
|
652
|
+
rng = np.random.default_rng(self.seed)
|
653
|
+
dist = stats.truncweibull_min
|
654
|
+
shapes = (2.5, 0.25, 1.75, 2., 3.)
|
655
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
656
|
+
shape_bounds = [(0.1, 10)]*5
|
657
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt)
|
658
|
+
|
659
|
+
assert_nlff_less_or_close(dist, data, res.params, shapes, **self.tols)
|
660
|
+
|
661
|
+
def test_missing_shape_bounds(self):
|
662
|
+
# some distributions have a small domain w.r.t. a parameter, e.g.
|
663
|
+
# $p \in [0, 1]$ for binomial distribution
|
664
|
+
# User does not need to provide these because the intersection of the
|
665
|
+
# user's bounds (none) and the distribution's domain is finite
|
666
|
+
N = 1000
|
667
|
+
rng = np.random.default_rng(self.seed)
|
668
|
+
|
669
|
+
dist = stats.binom
|
670
|
+
n, p, loc = 10, 0.65, 0
|
671
|
+
data = dist.rvs(n, p, loc=loc, size=N, random_state=rng)
|
672
|
+
shape_bounds = {'n': np.array([0, 20])} # check arrays are OK, too
|
673
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt)
|
674
|
+
assert_allclose(res.params, (n, p, loc), **self.tols)
|
675
|
+
|
676
|
+
dist = stats.bernoulli
|
677
|
+
p, loc = 0.314159, 0
|
678
|
+
data = dist.rvs(p, loc=loc, size=N, random_state=rng)
|
679
|
+
res = stats.fit(dist, data, optimizer=self.opt)
|
680
|
+
assert_allclose(res.params, (p, loc), **self.tols)
|
681
|
+
|
682
|
+
def test_fit_only_loc_scale(self):
|
683
|
+
# fit only loc
|
684
|
+
N = 5000
|
685
|
+
rng = np.random.default_rng(self.seed)
|
686
|
+
|
687
|
+
dist = stats.norm
|
688
|
+
loc, scale = 1.5, 1
|
689
|
+
data = dist.rvs(loc=loc, size=N, random_state=rng)
|
690
|
+
loc_bounds = (0, 5)
|
691
|
+
bounds = {'loc': loc_bounds}
|
692
|
+
res = stats.fit(dist, data, bounds, optimizer=self.opt)
|
693
|
+
assert_allclose(res.params, (loc, scale), **self.tols)
|
694
|
+
|
695
|
+
# fit only scale
|
696
|
+
loc, scale = 0, 2.5
|
697
|
+
data = dist.rvs(scale=scale, size=N, random_state=rng)
|
698
|
+
scale_bounds = (0.01, 5)
|
699
|
+
bounds = {'scale': scale_bounds}
|
700
|
+
res = stats.fit(dist, data, bounds, optimizer=self.opt)
|
701
|
+
assert_allclose(res.params, (loc, scale), **self.tols)
|
702
|
+
|
703
|
+
# fit only loc and scale
|
704
|
+
dist = stats.norm
|
705
|
+
loc, scale = 1.5, 2.5
|
706
|
+
data = dist.rvs(loc=loc, scale=scale, size=N, random_state=rng)
|
707
|
+
bounds = {'loc': loc_bounds, 'scale': scale_bounds}
|
708
|
+
res = stats.fit(dist, data, bounds, optimizer=self.opt)
|
709
|
+
assert_allclose(res.params, (loc, scale), **self.tols)
|
710
|
+
|
711
|
+
def test_everything_fixed(self):
|
712
|
+
N = 5000
|
713
|
+
rng = np.random.default_rng(self.seed)
|
714
|
+
|
715
|
+
dist = stats.norm
|
716
|
+
loc, scale = 1.5, 2.5
|
717
|
+
data = dist.rvs(loc=loc, scale=scale, size=N, random_state=rng)
|
718
|
+
|
719
|
+
# loc, scale fixed to 0, 1 by default
|
720
|
+
res = stats.fit(dist, data)
|
721
|
+
assert_allclose(res.params, (0, 1), **self.tols)
|
722
|
+
|
723
|
+
# loc, scale explicitly fixed
|
724
|
+
bounds = {'loc': (loc, loc), 'scale': (scale, scale)}
|
725
|
+
res = stats.fit(dist, data, bounds)
|
726
|
+
assert_allclose(res.params, (loc, scale), **self.tols)
|
727
|
+
|
728
|
+
# `n` gets fixed during polishing
|
729
|
+
dist = stats.binom
|
730
|
+
n, p, loc = 10, 0.65, 0
|
731
|
+
data = dist.rvs(n, p, loc=loc, size=N, random_state=rng)
|
732
|
+
shape_bounds = {'n': (0, 20), 'p': (0.65, 0.65)}
|
733
|
+
res = stats.fit(dist, data, shape_bounds, optimizer=self.opt)
|
734
|
+
assert_allclose(res.params, (n, p, loc), **self.tols)
|
735
|
+
|
736
|
+
def test_failure(self):
|
737
|
+
N = 5000
|
738
|
+
rng = np.random.default_rng(self.seed)
|
739
|
+
|
740
|
+
dist = stats.nbinom
|
741
|
+
shapes = (5, 0.5)
|
742
|
+
data = dist.rvs(*shapes, size=N, random_state=rng)
|
743
|
+
|
744
|
+
assert data.min() == 0
|
745
|
+
# With lower bounds on location at 0.5, likelihood is zero
|
746
|
+
bounds = [(0, 30), (0, 1), (0.5, 10)]
|
747
|
+
res = stats.fit(dist, data, bounds)
|
748
|
+
message = "Optimization converged to parameter values that are"
|
749
|
+
assert res.message.startswith(message)
|
750
|
+
assert res.success is False
|
751
|
+
|
752
|
+
@pytest.mark.xslow
|
753
|
+
def test_guess(self):
|
754
|
+
# Test that guess helps DE find the desired solution
|
755
|
+
N = 2000
|
756
|
+
# With some seeds, `fit` doesn't need a guess
|
757
|
+
rng = np.random.default_rng(196390444561)
|
758
|
+
dist = stats.nhypergeom
|
759
|
+
params = (20, 7, 12, 0)
|
760
|
+
bounds = [(2, 200), (0.7, 70), (1.2, 120), (0, 10)]
|
761
|
+
|
762
|
+
data = dist.rvs(*params, size=N, random_state=rng)
|
763
|
+
|
764
|
+
res = stats.fit(dist, data, bounds, optimizer=self.opt)
|
765
|
+
assert not np.allclose(res.params, params, **self.tols)
|
766
|
+
|
767
|
+
res = stats.fit(dist, data, bounds, guess=params, optimizer=self.opt)
|
768
|
+
assert_allclose(res.params, params, **self.tols)
|
769
|
+
|
770
|
+
def test_mse_accuracy_1(self):
|
771
|
+
# Test maximum spacing estimation against example from Wikipedia
|
772
|
+
# https://en.wikipedia.org/wiki/Maximum_spacing_estimation#Examples
|
773
|
+
data = [2, 4]
|
774
|
+
dist = stats.expon
|
775
|
+
bounds = {'loc': (0, 0), 'scale': (1e-8, 10)}
|
776
|
+
res_mle = stats.fit(dist, data, bounds=bounds, method='mle')
|
777
|
+
assert_allclose(res_mle.params.scale, 3, atol=1e-3)
|
778
|
+
res_mse = stats.fit(dist, data, bounds=bounds, method='mse')
|
779
|
+
assert_allclose(res_mse.params.scale, 3.915, atol=1e-3)
|
780
|
+
|
781
|
+
def test_mse_accuracy_2(self):
|
782
|
+
# Test maximum spacing estimation against example from Wikipedia
|
783
|
+
# https://en.wikipedia.org/wiki/Maximum_spacing_estimation#Examples
|
784
|
+
rng = np.random.default_rng(9843212616816518964)
|
785
|
+
|
786
|
+
dist = stats.uniform
|
787
|
+
n = 10
|
788
|
+
data = dist(3, 6).rvs(size=n, random_state=rng)
|
789
|
+
bounds = {'loc': (0, 10), 'scale': (1e-8, 10)}
|
790
|
+
res = stats.fit(dist, data, bounds=bounds, method='mse')
|
791
|
+
# (loc=3.608118420015416, scale=5.509323262055043)
|
792
|
+
|
793
|
+
x = np.sort(data)
|
794
|
+
a = (n*x[0] - x[-1])/(n - 1)
|
795
|
+
b = (n*x[-1] - x[0])/(n - 1)
|
796
|
+
ref = a, b-a # (3.6081133632151503, 5.509328130317254)
|
797
|
+
assert_allclose(res.params, ref, rtol=1e-4)
|
798
|
+
|
799
|
+
|
800
|
+
# Data from Matlab: https://www.mathworks.com/help/stats/lillietest.html
|
801
|
+
examgrades = [65, 61, 81, 88, 69, 89, 55, 84, 86, 84, 71, 81, 84, 81, 78, 67,
|
802
|
+
96, 66, 73, 75, 59, 71, 69, 63, 79, 76, 63, 85, 87, 88, 80, 71,
|
803
|
+
65, 84, 71, 75, 81, 79, 64, 65, 84, 77, 70, 75, 84, 75, 73, 92,
|
804
|
+
90, 79, 80, 71, 73, 71, 58, 79, 73, 64, 77, 82, 81, 59, 54, 82,
|
805
|
+
57, 79, 79, 73, 74, 82, 63, 64, 73, 69, 87, 68, 81, 73, 83, 73,
|
806
|
+
80, 73, 73, 71, 66, 78, 64, 74, 68, 67, 75, 75, 80, 85, 74, 76,
|
807
|
+
80, 77, 93, 70, 86, 80, 81, 83, 68, 60, 85, 64, 74, 82, 81, 77,
|
808
|
+
66, 85, 75, 81, 69, 60, 83, 72]
|
809
|
+
|
810
|
+
|
811
|
+
class TestGoodnessOfFit:
|
812
|
+
|
813
|
+
def test_gof_iv(self):
|
814
|
+
dist = stats.norm
|
815
|
+
x = [1, 2, 3]
|
816
|
+
|
817
|
+
message = r"`dist` must be a \(non-frozen\) instance of..."
|
818
|
+
with pytest.raises(TypeError, match=message):
|
819
|
+
goodness_of_fit(stats.norm(), x)
|
820
|
+
|
821
|
+
message = "`data` must be a one-dimensional array of numbers."
|
822
|
+
with pytest.raises(ValueError, match=message):
|
823
|
+
goodness_of_fit(dist, [[1, 2, 3]])
|
824
|
+
|
825
|
+
message = "`statistic` must be one of..."
|
826
|
+
with pytest.raises(ValueError, match=message):
|
827
|
+
goodness_of_fit(dist, x, statistic='mm')
|
828
|
+
|
829
|
+
message = "`n_mc_samples` must be an integer."
|
830
|
+
with pytest.raises(TypeError, match=message):
|
831
|
+
goodness_of_fit(dist, x, n_mc_samples=1000.5)
|
832
|
+
|
833
|
+
message = "SeedSequence expects int or sequence"
|
834
|
+
with pytest.raises(TypeError, match=message):
|
835
|
+
goodness_of_fit(dist, x, rng='herring')
|
836
|
+
|
837
|
+
def test_against_ks(self):
|
838
|
+
rng = np.random.default_rng(8517426291317196949)
|
839
|
+
x = examgrades
|
840
|
+
known_params = {'loc': np.mean(x), 'scale': np.std(x, ddof=1)}
|
841
|
+
res = goodness_of_fit(stats.norm, x, known_params=known_params,
|
842
|
+
statistic='ks', rng=rng)
|
843
|
+
ref = stats.kstest(x, stats.norm(**known_params).cdf, method='exact')
|
844
|
+
assert_allclose(res.statistic, ref.statistic) # ~0.0848
|
845
|
+
assert_allclose(res.pvalue, ref.pvalue, atol=5e-3) # ~0.335
|
846
|
+
|
847
|
+
def test_against_lilliefors(self):
|
848
|
+
rng = np.random.default_rng(2291803665717442724)
|
849
|
+
x = examgrades
|
850
|
+
# preserve use of old random_state during SPEC 7 transition
|
851
|
+
res = goodness_of_fit(stats.norm, x, statistic='ks', random_state=rng)
|
852
|
+
known_params = {'loc': np.mean(x), 'scale': np.std(x, ddof=1)}
|
853
|
+
ref = stats.kstest(x, stats.norm(**known_params).cdf, method='exact')
|
854
|
+
assert_allclose(res.statistic, ref.statistic) # ~0.0848
|
855
|
+
assert_allclose(res.pvalue, 0.0348, atol=5e-3)
|
856
|
+
|
857
|
+
def test_against_cvm(self):
|
858
|
+
rng = np.random.default_rng(8674330857509546614)
|
859
|
+
x = examgrades
|
860
|
+
known_params = {'loc': np.mean(x), 'scale': np.std(x, ddof=1)}
|
861
|
+
res = goodness_of_fit(stats.norm, x, known_params=known_params,
|
862
|
+
statistic='cvm', rng=rng)
|
863
|
+
ref = stats.cramervonmises(x, stats.norm(**known_params).cdf)
|
864
|
+
assert_allclose(res.statistic, ref.statistic) # ~0.090
|
865
|
+
assert_allclose(res.pvalue, ref.pvalue, atol=5e-3) # ~0.636
|
866
|
+
|
867
|
+
def test_against_anderson_case_0(self):
|
868
|
+
# "Case 0" is where loc and scale are known [1]
|
869
|
+
rng = np.random.default_rng(7384539336846690410)
|
870
|
+
x = np.arange(1, 101)
|
871
|
+
# loc that produced critical value of statistic found w/ root_scalar
|
872
|
+
known_params = {'loc': 45.01575354024957, 'scale': 30}
|
873
|
+
res = goodness_of_fit(stats.norm, x, known_params=known_params,
|
874
|
+
statistic='ad', rng=rng)
|
875
|
+
assert_allclose(res.statistic, 2.492) # See [1] Table 1A 1.0
|
876
|
+
assert_allclose(res.pvalue, 0.05, atol=5e-3)
|
877
|
+
|
878
|
+
def test_against_anderson_case_1(self):
|
879
|
+
# "Case 1" is where scale is known and loc is fit [1]
|
880
|
+
rng = np.random.default_rng(5040212485680146248)
|
881
|
+
x = np.arange(1, 101)
|
882
|
+
# scale that produced critical value of statistic found w/ root_scalar
|
883
|
+
known_params = {'scale': 29.957112639101933}
|
884
|
+
res = goodness_of_fit(stats.norm, x, known_params=known_params,
|
885
|
+
statistic='ad', rng=rng)
|
886
|
+
assert_allclose(res.statistic, 0.908) # See [1] Table 1B 1.1
|
887
|
+
assert_allclose(res.pvalue, 0.1, atol=5e-3)
|
888
|
+
|
889
|
+
def test_against_anderson_case_2(self):
|
890
|
+
# "Case 2" is where loc is known and scale is fit [1]
|
891
|
+
rng = np.random.default_rng(726693985720914083)
|
892
|
+
x = np.arange(1, 101)
|
893
|
+
# loc that produced critical value of statistic found w/ root_scalar
|
894
|
+
known_params = {'loc': 44.5680212261933}
|
895
|
+
res = goodness_of_fit(stats.norm, x, known_params=known_params,
|
896
|
+
statistic='ad', rng=rng)
|
897
|
+
assert_allclose(res.statistic, 2.904) # See [1] Table 1B 1.2
|
898
|
+
assert_allclose(res.pvalue, 0.025, atol=5e-3)
|
899
|
+
|
900
|
+
def test_against_anderson_case_3(self):
|
901
|
+
# "Case 3" is where both loc and scale are fit [1]
|
902
|
+
rng = np.random.default_rng(6763691329830218206)
|
903
|
+
# c that produced critical value of statistic found w/ root_scalar
|
904
|
+
x = stats.skewnorm.rvs(1.4477847789132101, loc=1, scale=2, size=100,
|
905
|
+
random_state=rng)
|
906
|
+
res = goodness_of_fit(stats.norm, x, statistic='ad', rng=rng)
|
907
|
+
assert_allclose(res.statistic, 0.559) # See [1] Table 1B 1.2
|
908
|
+
assert_allclose(res.pvalue, 0.15, atol=5e-3)
|
909
|
+
|
910
|
+
@pytest.mark.xslow
|
911
|
+
def test_against_anderson_gumbel_r(self):
|
912
|
+
rng = np.random.default_rng(7302761058217743)
|
913
|
+
# c that produced critical value of statistic found w/ root_scalar
|
914
|
+
x = stats.genextreme(0.051896837188595134, loc=0.5,
|
915
|
+
scale=1.5).rvs(size=1000, random_state=rng)
|
916
|
+
res = goodness_of_fit(stats.gumbel_r, x, statistic='ad',
|
917
|
+
rng=rng)
|
918
|
+
ref = stats.anderson(x, dist='gumbel_r')
|
919
|
+
assert_allclose(res.statistic, ref.critical_values[0])
|
920
|
+
assert_allclose(res.pvalue, ref.significance_level[0]/100, atol=5e-3)
|
921
|
+
|
922
|
+
def test_against_filliben_norm(self):
|
923
|
+
# Test against `stats.fit` ref. [7] Section 8 "Example"
|
924
|
+
rng = np.random.default_rng(8024266430745011915)
|
925
|
+
y = [6, 1, -4, 8, -2, 5, 0]
|
926
|
+
known_params = {'loc': 0, 'scale': 1}
|
927
|
+
res = stats.goodness_of_fit(stats.norm, y, known_params=known_params,
|
928
|
+
statistic="filliben", rng=rng)
|
929
|
+
# Slight discrepancy presumably due to roundoff in Filliben's
|
930
|
+
# calculation. Using exact order statistic medians instead of
|
931
|
+
# Filliben's approximation doesn't account for it.
|
932
|
+
assert_allclose(res.statistic, 0.98538, atol=1e-4)
|
933
|
+
assert 0.75 < res.pvalue < 0.9
|
934
|
+
|
935
|
+
# Using R's ppcc library:
|
936
|
+
# library(ppcc)
|
937
|
+
# options(digits=16)
|
938
|
+
# x < - c(6, 1, -4, 8, -2, 5, 0)
|
939
|
+
# set.seed(100)
|
940
|
+
# ppccTest(x, "qnorm", ppos="Filliben")
|
941
|
+
# Discrepancy with
|
942
|
+
assert_allclose(res.statistic, 0.98540957187084, rtol=2e-5)
|
943
|
+
assert_allclose(res.pvalue, 0.8875, rtol=2e-3)
|
944
|
+
|
945
|
+
def test_filliben_property(self):
|
946
|
+
# Filliben's statistic should be independent of data location and scale
|
947
|
+
rng = np.random.default_rng(8535677809395478813)
|
948
|
+
x = rng.normal(loc=10, scale=0.5, size=100)
|
949
|
+
res = stats.goodness_of_fit(stats.norm, x,
|
950
|
+
statistic="filliben", rng=rng)
|
951
|
+
known_params = {'loc': 0, 'scale': 1}
|
952
|
+
ref = stats.goodness_of_fit(stats.norm, x, known_params=known_params,
|
953
|
+
statistic="filliben", rng=rng)
|
954
|
+
assert_allclose(res.statistic, ref.statistic, rtol=1e-15)
|
955
|
+
|
956
|
+
@pytest.mark.parametrize('case', [(25, [.928, .937, .950, .958, .966]),
|
957
|
+
(50, [.959, .965, .972, .977, .981]),
|
958
|
+
(95, [.977, .979, .983, .986, .989])])
|
959
|
+
def test_against_filliben_norm_table(self, case):
|
960
|
+
# Test against `stats.fit` ref. [7] Table 1
|
961
|
+
rng = np.random.default_rng(504569995557928957)
|
962
|
+
n, ref = case
|
963
|
+
x = rng.random(n)
|
964
|
+
known_params = {'loc': 0, 'scale': 1}
|
965
|
+
res = stats.goodness_of_fit(stats.norm, x, known_params=known_params,
|
966
|
+
statistic="filliben", rng=rng)
|
967
|
+
percentiles = np.array([0.005, 0.01, 0.025, 0.05, 0.1])
|
968
|
+
res = stats.scoreatpercentile(res.null_distribution, percentiles*100)
|
969
|
+
assert_allclose(res, ref, atol=2e-3)
|
970
|
+
|
971
|
+
@pytest.mark.xslow
|
972
|
+
@pytest.mark.parametrize('case', [(5, 0.95772790260469, 0.4755),
|
973
|
+
(6, 0.95398832257958, 0.3848),
|
974
|
+
(7, 0.9432692889277, 0.2328)])
|
975
|
+
def test_against_ppcc(self, case):
|
976
|
+
# Test against R ppcc, e.g.
|
977
|
+
# library(ppcc)
|
978
|
+
# options(digits=16)
|
979
|
+
# x < - c(0.52325412, 1.06907699, -0.36084066, 0.15305959, 0.99093194)
|
980
|
+
# set.seed(100)
|
981
|
+
# ppccTest(x, "qrayleigh", ppos="Filliben")
|
982
|
+
n, ref_statistic, ref_pvalue = case
|
983
|
+
rng = np.random.default_rng(7777775561439803116)
|
984
|
+
x = rng.normal(size=n)
|
985
|
+
res = stats.goodness_of_fit(stats.rayleigh, x, statistic="filliben",
|
986
|
+
rng=rng)
|
987
|
+
assert_allclose(res.statistic, ref_statistic, rtol=1e-4)
|
988
|
+
assert_allclose(res.pvalue, ref_pvalue, atol=1.5e-2)
|
989
|
+
|
990
|
+
def test_params_effects(self):
|
991
|
+
# Ensure that `guessed_params`, `fit_params`, and `known_params` have
|
992
|
+
# the intended effects.
|
993
|
+
rng = np.random.default_rng(9121950977643805391)
|
994
|
+
x = stats.skewnorm.rvs(-5.044559778383153, loc=1, scale=2, size=50,
|
995
|
+
random_state=rng)
|
996
|
+
|
997
|
+
# Show that `guessed_params` don't fit to the guess,
|
998
|
+
# but `fit_params` and `known_params` respect the provided fit
|
999
|
+
guessed_params = {'c': 13.4}
|
1000
|
+
fit_params = {'scale': 13.73}
|
1001
|
+
known_params = {'loc': -13.85}
|
1002
|
+
rng = np.random.default_rng(9121950977643805391)
|
1003
|
+
res1 = goodness_of_fit(stats.weibull_min, x, n_mc_samples=2,
|
1004
|
+
guessed_params=guessed_params,
|
1005
|
+
fit_params=fit_params,
|
1006
|
+
known_params=known_params, rng=rng)
|
1007
|
+
assert not np.allclose(res1.fit_result.params.c, 13.4)
|
1008
|
+
assert_equal(res1.fit_result.params.scale, 13.73)
|
1009
|
+
assert_equal(res1.fit_result.params.loc, -13.85)
|
1010
|
+
|
1011
|
+
# Show that changing the guess changes the parameter that gets fit,
|
1012
|
+
# and it changes the null distribution
|
1013
|
+
guessed_params = {'c': 2}
|
1014
|
+
rng = np.random.default_rng(9121950977643805391)
|
1015
|
+
res2 = goodness_of_fit(stats.weibull_min, x, n_mc_samples=2,
|
1016
|
+
guessed_params=guessed_params,
|
1017
|
+
fit_params=fit_params,
|
1018
|
+
known_params=known_params, rng=rng)
|
1019
|
+
assert not np.allclose(res2.fit_result.params.c,
|
1020
|
+
res1.fit_result.params.c, rtol=1e-8)
|
1021
|
+
assert not np.allclose(res2.null_distribution,
|
1022
|
+
res1.null_distribution, rtol=1e-8)
|
1023
|
+
assert_equal(res2.fit_result.params.scale, 13.73)
|
1024
|
+
assert_equal(res2.fit_result.params.loc, -13.85)
|
1025
|
+
|
1026
|
+
# If we set all parameters as fit_params and known_params,
|
1027
|
+
# they're all fixed to those values, but the null distribution
|
1028
|
+
# varies.
|
1029
|
+
fit_params = {'c': 13.4, 'scale': 13.73}
|
1030
|
+
rng = np.random.default_rng(9121950977643805391)
|
1031
|
+
res3 = goodness_of_fit(stats.weibull_min, x, n_mc_samples=2,
|
1032
|
+
guessed_params=guessed_params,
|
1033
|
+
fit_params=fit_params,
|
1034
|
+
known_params=known_params, rng=rng)
|
1035
|
+
assert_equal(res3.fit_result.params.c, 13.4)
|
1036
|
+
assert_equal(res3.fit_result.params.scale, 13.73)
|
1037
|
+
assert_equal(res3.fit_result.params.loc, -13.85)
|
1038
|
+
assert not np.allclose(res3.null_distribution, res1.null_distribution)
|
1039
|
+
|
1040
|
+
def test_custom_statistic(self):
|
1041
|
+
# Test support for custom statistic function.
|
1042
|
+
|
1043
|
+
# References:
|
1044
|
+
# [1] Pyke, R. (1965). "Spacings". Journal of the Royal Statistical
|
1045
|
+
# Society: Series B (Methodological), 27(3): 395-436.
|
1046
|
+
# [2] Burrows, P. M. (1979). "Selected Percentage Points of
|
1047
|
+
# Greenwood's Statistics". Journal of the Royal Statistical
|
1048
|
+
# Society. Series A (General), 142(2): 256-258.
|
1049
|
+
|
1050
|
+
# Use the Greenwood statistic for illustration; see [1, p.402].
|
1051
|
+
def greenwood(dist, data, *, axis):
|
1052
|
+
x = np.sort(data, axis=axis)
|
1053
|
+
y = dist.cdf(x)
|
1054
|
+
d = np.diff(y, axis=axis, prepend=0, append=1)
|
1055
|
+
return np.sum(d ** 2, axis=axis)
|
1056
|
+
|
1057
|
+
# Run the Monte Carlo test with sample size = 5 on a fully specified
|
1058
|
+
# null distribution, and compare the simulated quantiles to the exact
|
1059
|
+
# ones given in [2, Table 1, column (n = 5)].
|
1060
|
+
rng = np.random.default_rng(9121950977643805391)
|
1061
|
+
data = stats.expon.rvs(size=5, random_state=rng)
|
1062
|
+
result = goodness_of_fit(stats.expon, data,
|
1063
|
+
known_params={'loc': 0, 'scale': 1},
|
1064
|
+
statistic=greenwood, rng=rng)
|
1065
|
+
p = [.01, .05, .1, .2, .3, .4, .5, .6, .7, .8, .9, .95, .99]
|
1066
|
+
exact_quantiles = [
|
1067
|
+
.183863, .199403, .210088, .226040, .239947, .253677, .268422,
|
1068
|
+
.285293, .306002, .334447, .382972, .432049, .547468]
|
1069
|
+
simulated_quantiles = np.quantile(result.null_distribution, p)
|
1070
|
+
assert_allclose(simulated_quantiles, exact_quantiles, atol=0.005)
|
1071
|
+
|
1072
|
+
class TestFitResult:
|
1073
|
+
def test_plot_iv(self):
|
1074
|
+
rng = np.random.default_rng(1769658657308472721)
|
1075
|
+
data = stats.norm.rvs(0, 1, size=100, random_state=rng)
|
1076
|
+
|
1077
|
+
def optimizer(*args, **kwargs):
|
1078
|
+
return differential_evolution(*args, **kwargs, rng=rng)
|
1079
|
+
|
1080
|
+
bounds = [(0, 30), (0, 1)]
|
1081
|
+
res = stats.fit(stats.norm, data, bounds, optimizer=optimizer)
|
1082
|
+
try:
|
1083
|
+
import matplotlib # noqa: F401
|
1084
|
+
message = r"`plot_type` must be one of \{'..."
|
1085
|
+
with pytest.raises(ValueError, match=message):
|
1086
|
+
res.plot(plot_type='llama')
|
1087
|
+
except (ModuleNotFoundError, ImportError):
|
1088
|
+
message = r"matplotlib must be installed to use method `plot`."
|
1089
|
+
with pytest.raises(ModuleNotFoundError, match=message):
|
1090
|
+
res.plot(plot_type='llama')
|