scipy 1.16.1__cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.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 +138 -0
- scipy/_cyutility.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/_lib/_gcutils.py +105 -0
- scipy/_lib/_pep440.py +487 -0
- scipy/_lib/_sparse.py +41 -0
- scipy/_lib/_test_ccallback.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/_lib/_test_deprecation_call.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/_lib/_test_deprecation_def.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/cluster/_optimal_leaf_ordering.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/cluster/_vq.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/integrate/_ode.py +1395 -0
- scipy/integrate/_odepack.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/integrate/_odepack_py.py +273 -0
- scipy/integrate/_quad_vec.py +674 -0
- scipy/integrate/_quadpack.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/integrate/_test_odeint_banded.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/integrate/_vode.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/interpolate/_dierckx.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/interpolate/_fitpack.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/interpolate/_rbf.py +290 -0
- scipy/interpolate/_rbfinterp.py +550 -0
- scipy/interpolate/_rbfinterp_pythran.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/interpolate/_rgi.py +764 -0
- scipy/interpolate/_rgi_cython.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/io/matlab/_mio_utils.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/io/matlab/_miobase.py +435 -0
- scipy/io/matlab/_streams.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_decomp_ldl.py +356 -0
- scipy/linalg/_decomp_lu.py +401 -0
- scipy/linalg/_decomp_lu_cython.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_expm_frechet.py +417 -0
- scipy/linalg/_fblas.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_flapack.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_lapack_subroutines.h +1521 -0
- scipy/linalg/_linalg_pythran.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_matfuncs.py +1050 -0
- scipy/linalg/_matfuncs_expm.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_matfuncs_expm.pyi +6 -0
- scipy/linalg/_matfuncs_inv_ssq.py +886 -0
- scipy/linalg/_matfuncs_schur_sqrtm.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_matfuncs_sqrtm.py +107 -0
- scipy/linalg/_matfuncs_sqrtm_triu.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/_misc.py +191 -0
- scipy/linalg/_procrustes.py +113 -0
- scipy/linalg/_sketches.py +189 -0
- scipy/linalg/_solve_toeplitz.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/linalg/cython_blas.pxd +169 -0
- scipy/linalg/cython_blas.pyx +1432 -0
- scipy/linalg/cython_lapack.cpython-314t-x86_64-linux-gnu.so +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 +3616 -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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/ndimage/_cytest.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/ndimage/_ndimage_api.py +16 -0
- scipy/ndimage/_ni_docstrings.py +214 -0
- scipy/ndimage/_ni_label.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/ndimage/_ni_support.py +139 -0
- scipy/ndimage/_rank_filter_1d.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/optimize/_hessian_update_strategy.py +479 -0
- scipy/optimize/_highspy/__init__.py +0 -0
- scipy/optimize/_highspy/_core.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/optimize/_highspy/_highs_options.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/optimize/_highspy/_highs_wrapper.py +338 -0
- scipy/optimize/_isotonic.py +157 -0
- scipy/optimize/_lbfgsb.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/optimize/_minpack_py.py +1178 -0
- scipy/optimize/_moduleTNC.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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 +3335 -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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/signal/_peak_finding.py +1310 -0
- scipy/signal/_peak_finding_utils.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/signal/_polyutils.py +172 -0
- scipy/signal/_savitzky_golay.py +357 -0
- scipy/signal/_short_time_fft.py +2187 -0
- scipy/signal/_signal_api.py +30 -0
- scipy/signal/_signaltools.py +5309 -0
- scipy/signal/_sigtools.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/signal/_sosfilt.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/signal/_spectral_py.py +2471 -0
- scipy/signal/_spline.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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 +1098 -0
- scipy/signal/tests/test_signaltools.py +4729 -0
- scipy/signal/tests/test_spectral.py +2103 -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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_laplacian.py +563 -0
- scipy/sparse/csgraph/_matching.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_min_spanning_tree.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_reordering.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_shortest_path.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_tools.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/csgraph/_traversal.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/linalg/_propack/_dpropack.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/linalg/_propack/_spropack.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/sparse/linalg/_propack/_zpropack.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/_distance_pybind.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/_distance_wrap.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/_geometric_slerp.py +238 -0
- scipy/spatial/_hausdorff.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/_kdtree.py +920 -0
- scipy/spatial/_plotutils.py +274 -0
- scipy/spatial/_procrustes.py +132 -0
- scipy/spatial/_qhull.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/_qhull.pyi +213 -0
- scipy/spatial/_spherical_voronoi.py +341 -0
- scipy/spatial/_voronoi.cpython-314t-x86_64-linux-gnu.so +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/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 +2388 -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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/spatial/transform/_rotation.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/special/_ellip_harm.py +214 -0
- scipy/special/_ellip_harm_2.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/special/_gufuncs.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/special/_special_ufuncs.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/special/_test_internal.pyi +9 -0
- scipy/special/_testutils.py +321 -0
- scipy/special/_ufuncs.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/special/_ufuncs.pyi +522 -0
- scipy/special/_ufuncs.pyx +13173 -0
- scipy/special/_ufuncs_cxx.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/stats/_axis_nan_policy.py +692 -0
- scipy/stats/_biasedurn.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/stats/_qmc_cy.pyi +54 -0
- scipy/stats/_qmvnt.py +454 -0
- scipy/stats/_qmvnt_cy.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/stats/_quantile.py +335 -0
- scipy/stats/_rcont/__init__.py +4 -0
- scipy/stats/_rcont/rcont.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +0 -0
- scipy/stats/_sobol.pyi +54 -0
- scipy/stats/_sobol_direction_numbers.npz +0 -0
- scipy/stats/_stats.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.cpython-314t-x86_64-linux-gnu.so +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.1.dist-info/LICENSE.txt +934 -0
- scipy-1.16.1.dist-info/METADATA +1083 -0
- scipy-1.16.1.dist-info/RECORD +1417 -0
- scipy-1.16.1.dist-info/WHEEL +6 -0
- scipy.libs/libgfortran-040039e1-0352e75f.so.5.0.0 +0 -0
- scipy.libs/libgfortran-040039e1.so.5.0.0 +0 -0
- scipy.libs/libquadmath-96973f99-934c22de.so.0.0.0 +0 -0
- scipy.libs/libquadmath-96973f99.so.0.0.0 +0 -0
- scipy.libs/libscipy_openblas-68440149.so +0 -0
@@ -0,0 +1,949 @@
|
|
1
|
+
import numpy as np
|
2
|
+
from scipy.sparse.linalg import LinearOperator
|
3
|
+
from scipy.sparse import kron, eye_array, dia_array
|
4
|
+
|
5
|
+
__all__ = ['LaplacianNd']
|
6
|
+
# Sakurai and Mikota classes are intended for tests and benchmarks
|
7
|
+
# and explicitly not included in the public API of this module.
|
8
|
+
|
9
|
+
|
10
|
+
class LaplacianNd(LinearOperator):
|
11
|
+
"""
|
12
|
+
The grid Laplacian in ``N`` dimensions and its eigenvalues/eigenvectors.
|
13
|
+
|
14
|
+
Construct Laplacian on a uniform rectangular grid in `N` dimensions
|
15
|
+
and output its eigenvalues and eigenvectors.
|
16
|
+
The Laplacian ``L`` is square, negative definite, real symmetric array
|
17
|
+
with signed integer entries and zeros otherwise.
|
18
|
+
|
19
|
+
Parameters
|
20
|
+
----------
|
21
|
+
grid_shape : tuple
|
22
|
+
A tuple of integers of length ``N`` (corresponding to the dimension of
|
23
|
+
the Lapacian), where each entry gives the size of that dimension. The
|
24
|
+
Laplacian matrix is square of the size ``np.prod(grid_shape)``.
|
25
|
+
boundary_conditions : {'neumann', 'dirichlet', 'periodic'}, optional
|
26
|
+
The type of the boundary conditions on the boundaries of the grid.
|
27
|
+
Valid values are ``'dirichlet'`` or ``'neumann'``(default) or
|
28
|
+
``'periodic'``.
|
29
|
+
dtype : dtype
|
30
|
+
Numerical type of the array. Default is ``np.int8``.
|
31
|
+
|
32
|
+
Methods
|
33
|
+
-------
|
34
|
+
toarray()
|
35
|
+
Construct a dense array from Laplacian data
|
36
|
+
tosparse()
|
37
|
+
Construct a sparse array from Laplacian data
|
38
|
+
eigenvalues(m=None)
|
39
|
+
Construct a 1D array of `m` largest (smallest in absolute value)
|
40
|
+
eigenvalues of the Laplacian matrix in ascending order.
|
41
|
+
eigenvectors(m=None):
|
42
|
+
Construct the array with columns made of `m` eigenvectors (``float``)
|
43
|
+
of the ``Nd`` Laplacian corresponding to the `m` ordered eigenvalues.
|
44
|
+
|
45
|
+
.. versionadded:: 1.12.0
|
46
|
+
|
47
|
+
Notes
|
48
|
+
-----
|
49
|
+
Compared to the MATLAB/Octave implementation [1] of 1-, 2-, and 3-D
|
50
|
+
Laplacian, this code allows the arbitrary N-D case and the matrix-free
|
51
|
+
callable option, but is currently limited to pure Dirichlet, Neumann or
|
52
|
+
Periodic boundary conditions only.
|
53
|
+
|
54
|
+
The Laplacian matrix of a graph (`scipy.sparse.csgraph.laplacian`) of a
|
55
|
+
rectangular grid corresponds to the negative Laplacian with the Neumann
|
56
|
+
conditions, i.e., ``boundary_conditions = 'neumann'``.
|
57
|
+
|
58
|
+
All eigenvalues and eigenvectors of the discrete Laplacian operator for
|
59
|
+
an ``N``-dimensional regular grid of shape `grid_shape` with the grid
|
60
|
+
step size ``h=1`` are analytically known [2].
|
61
|
+
|
62
|
+
References
|
63
|
+
----------
|
64
|
+
.. [1] https://github.com/lobpcg/blopex/blob/master/blopex_\
|
65
|
+
tools/matlab/laplacian/laplacian.m
|
66
|
+
.. [2] "Eigenvalues and eigenvectors of the second derivative", Wikipedia
|
67
|
+
https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors_\
|
68
|
+
of_the_second_derivative
|
69
|
+
|
70
|
+
Examples
|
71
|
+
--------
|
72
|
+
>>> import numpy as np
|
73
|
+
>>> from scipy.sparse.linalg import LaplacianNd
|
74
|
+
>>> from scipy.sparse import diags_array, csgraph
|
75
|
+
>>> from scipy.linalg import eigvalsh
|
76
|
+
|
77
|
+
The one-dimensional Laplacian demonstrated below for pure Neumann boundary
|
78
|
+
conditions on a regular grid with ``n=6`` grid points is exactly the
|
79
|
+
negative graph Laplacian for the undirected linear graph with ``n``
|
80
|
+
vertices using the sparse adjacency matrix ``G`` represented by the
|
81
|
+
famous tri-diagonal matrix:
|
82
|
+
|
83
|
+
>>> n = 6
|
84
|
+
>>> G = diags_array(np.ones(n - 1), offsets=1, format='csr')
|
85
|
+
>>> Lf = csgraph.laplacian(G, symmetrized=True, form='function')
|
86
|
+
>>> grid_shape = (n, )
|
87
|
+
>>> lap = LaplacianNd(grid_shape, boundary_conditions='neumann')
|
88
|
+
>>> np.array_equal(lap.matmat(np.eye(n)), -Lf(np.eye(n)))
|
89
|
+
True
|
90
|
+
|
91
|
+
Since all matrix entries of the Laplacian are integers, ``'int8'`` is
|
92
|
+
the default dtype for storing matrix representations.
|
93
|
+
|
94
|
+
>>> lap.tosparse()
|
95
|
+
<DIAgonal sparse array of dtype 'int8'
|
96
|
+
with 16 stored elements (3 diagonals) and shape (6, 6)>
|
97
|
+
>>> lap.toarray()
|
98
|
+
array([[-1, 1, 0, 0, 0, 0],
|
99
|
+
[ 1, -2, 1, 0, 0, 0],
|
100
|
+
[ 0, 1, -2, 1, 0, 0],
|
101
|
+
[ 0, 0, 1, -2, 1, 0],
|
102
|
+
[ 0, 0, 0, 1, -2, 1],
|
103
|
+
[ 0, 0, 0, 0, 1, -1]], dtype=int8)
|
104
|
+
>>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
|
105
|
+
True
|
106
|
+
>>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
|
107
|
+
True
|
108
|
+
|
109
|
+
Any number of extreme eigenvalues and/or eigenvectors can be computed.
|
110
|
+
|
111
|
+
>>> lap = LaplacianNd(grid_shape, boundary_conditions='periodic')
|
112
|
+
>>> lap.eigenvalues()
|
113
|
+
array([-4., -3., -3., -1., -1., 0.])
|
114
|
+
>>> lap.eigenvalues()[-2:]
|
115
|
+
array([-1., 0.])
|
116
|
+
>>> lap.eigenvalues(2)
|
117
|
+
array([-1., 0.])
|
118
|
+
>>> lap.eigenvectors(1)
|
119
|
+
array([[0.40824829],
|
120
|
+
[0.40824829],
|
121
|
+
[0.40824829],
|
122
|
+
[0.40824829],
|
123
|
+
[0.40824829],
|
124
|
+
[0.40824829]])
|
125
|
+
>>> lap.eigenvectors(2)
|
126
|
+
array([[ 0.5 , 0.40824829],
|
127
|
+
[ 0. , 0.40824829],
|
128
|
+
[-0.5 , 0.40824829],
|
129
|
+
[-0.5 , 0.40824829],
|
130
|
+
[ 0. , 0.40824829],
|
131
|
+
[ 0.5 , 0.40824829]])
|
132
|
+
>>> lap.eigenvectors()
|
133
|
+
array([[ 0.40824829, 0.28867513, 0.28867513, 0.5 , 0.5 ,
|
134
|
+
0.40824829],
|
135
|
+
[-0.40824829, -0.57735027, -0.57735027, 0. , 0. ,
|
136
|
+
0.40824829],
|
137
|
+
[ 0.40824829, 0.28867513, 0.28867513, -0.5 , -0.5 ,
|
138
|
+
0.40824829],
|
139
|
+
[-0.40824829, 0.28867513, 0.28867513, -0.5 , -0.5 ,
|
140
|
+
0.40824829],
|
141
|
+
[ 0.40824829, -0.57735027, -0.57735027, 0. , 0. ,
|
142
|
+
0.40824829],
|
143
|
+
[-0.40824829, 0.28867513, 0.28867513, 0.5 , 0.5 ,
|
144
|
+
0.40824829]])
|
145
|
+
|
146
|
+
The two-dimensional Laplacian is illustrated on a regular grid with
|
147
|
+
``grid_shape = (2, 3)`` points in each dimension.
|
148
|
+
|
149
|
+
>>> grid_shape = (2, 3)
|
150
|
+
>>> n = np.prod(grid_shape)
|
151
|
+
|
152
|
+
Numeration of grid points is as follows:
|
153
|
+
|
154
|
+
>>> np.arange(n).reshape(grid_shape + (-1,))
|
155
|
+
array([[[0],
|
156
|
+
[1],
|
157
|
+
[2]],
|
158
|
+
<BLANKLINE>
|
159
|
+
[[3],
|
160
|
+
[4],
|
161
|
+
[5]]])
|
162
|
+
|
163
|
+
Each of the boundary conditions ``'dirichlet'``, ``'periodic'``, and
|
164
|
+
``'neumann'`` is illustrated separately; with ``'dirichlet'``
|
165
|
+
|
166
|
+
>>> lap = LaplacianNd(grid_shape, boundary_conditions='dirichlet')
|
167
|
+
>>> lap.tosparse()
|
168
|
+
<Compressed Sparse Row sparse array of dtype 'int8'
|
169
|
+
with 20 stored elements and shape (6, 6)>
|
170
|
+
>>> lap.toarray()
|
171
|
+
array([[-4, 1, 0, 1, 0, 0],
|
172
|
+
[ 1, -4, 1, 0, 1, 0],
|
173
|
+
[ 0, 1, -4, 0, 0, 1],
|
174
|
+
[ 1, 0, 0, -4, 1, 0],
|
175
|
+
[ 0, 1, 0, 1, -4, 1],
|
176
|
+
[ 0, 0, 1, 0, 1, -4]], dtype=int8)
|
177
|
+
>>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
|
178
|
+
True
|
179
|
+
>>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
|
180
|
+
True
|
181
|
+
>>> lap.eigenvalues()
|
182
|
+
array([-6.41421356, -5. , -4.41421356, -3.58578644, -3. ,
|
183
|
+
-1.58578644])
|
184
|
+
>>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
|
185
|
+
>>> np.allclose(lap.eigenvalues(), eigvals)
|
186
|
+
True
|
187
|
+
>>> np.allclose(lap.toarray() @ lap.eigenvectors(),
|
188
|
+
... lap.eigenvectors() @ np.diag(lap.eigenvalues()))
|
189
|
+
True
|
190
|
+
|
191
|
+
with ``'periodic'``
|
192
|
+
|
193
|
+
>>> lap = LaplacianNd(grid_shape, boundary_conditions='periodic')
|
194
|
+
>>> lap.tosparse()
|
195
|
+
<Compressed Sparse Row sparse array of dtype 'int8'
|
196
|
+
with 24 stored elements and shape (6, 6)>
|
197
|
+
>>> lap.toarray()
|
198
|
+
array([[-4, 1, 1, 2, 0, 0],
|
199
|
+
[ 1, -4, 1, 0, 2, 0],
|
200
|
+
[ 1, 1, -4, 0, 0, 2],
|
201
|
+
[ 2, 0, 0, -4, 1, 1],
|
202
|
+
[ 0, 2, 0, 1, -4, 1],
|
203
|
+
[ 0, 0, 2, 1, 1, -4]], dtype=int8)
|
204
|
+
>>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
|
205
|
+
True
|
206
|
+
>>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
|
207
|
+
True
|
208
|
+
>>> lap.eigenvalues()
|
209
|
+
array([-7., -7., -4., -3., -3., 0.])
|
210
|
+
>>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
|
211
|
+
>>> np.allclose(lap.eigenvalues(), eigvals)
|
212
|
+
True
|
213
|
+
>>> np.allclose(lap.toarray() @ lap.eigenvectors(),
|
214
|
+
... lap.eigenvectors() @ np.diag(lap.eigenvalues()))
|
215
|
+
True
|
216
|
+
|
217
|
+
and with ``'neumann'``
|
218
|
+
|
219
|
+
>>> lap = LaplacianNd(grid_shape, boundary_conditions='neumann')
|
220
|
+
>>> lap.tosparse()
|
221
|
+
<Compressed Sparse Row sparse array of dtype 'int8'
|
222
|
+
with 20 stored elements and shape (6, 6)>
|
223
|
+
>>> lap.toarray()
|
224
|
+
array([[-2, 1, 0, 1, 0, 0],
|
225
|
+
[ 1, -3, 1, 0, 1, 0],
|
226
|
+
[ 0, 1, -2, 0, 0, 1],
|
227
|
+
[ 1, 0, 0, -2, 1, 0],
|
228
|
+
[ 0, 1, 0, 1, -3, 1],
|
229
|
+
[ 0, 0, 1, 0, 1, -2]], dtype=int8)
|
230
|
+
>>> np.array_equal(lap.matmat(np.eye(n)), lap.toarray())
|
231
|
+
True
|
232
|
+
>>> np.array_equal(lap.tosparse().toarray(), lap.toarray())
|
233
|
+
True
|
234
|
+
>>> lap.eigenvalues()
|
235
|
+
array([-5., -3., -3., -2., -1., 0.])
|
236
|
+
>>> eigvals = eigvalsh(lap.toarray().astype(np.float64))
|
237
|
+
>>> np.allclose(lap.eigenvalues(), eigvals)
|
238
|
+
True
|
239
|
+
>>> np.allclose(lap.toarray() @ lap.eigenvectors(),
|
240
|
+
... lap.eigenvectors() @ np.diag(lap.eigenvalues()))
|
241
|
+
True
|
242
|
+
|
243
|
+
"""
|
244
|
+
|
245
|
+
def __init__(self, grid_shape, *,
|
246
|
+
boundary_conditions='neumann',
|
247
|
+
dtype=np.int8):
|
248
|
+
|
249
|
+
if boundary_conditions not in ('dirichlet', 'neumann', 'periodic'):
|
250
|
+
raise ValueError(
|
251
|
+
f"Unknown value {boundary_conditions!r} is given for "
|
252
|
+
"'boundary_conditions' parameter. The valid options are "
|
253
|
+
"'dirichlet', 'periodic', and 'neumann' (default)."
|
254
|
+
)
|
255
|
+
|
256
|
+
self.grid_shape = grid_shape
|
257
|
+
self.boundary_conditions = boundary_conditions
|
258
|
+
# LaplacianNd folds all dimensions in `grid_shape` into a single one
|
259
|
+
N = np.prod(grid_shape)
|
260
|
+
super().__init__(dtype=dtype, shape=(N, N))
|
261
|
+
|
262
|
+
def _eigenvalue_ordering(self, m):
|
263
|
+
"""Compute `m` largest eigenvalues in each of the ``N`` directions,
|
264
|
+
i.e., up to ``m * N`` total, order them and return `m` largest.
|
265
|
+
"""
|
266
|
+
grid_shape = self.grid_shape
|
267
|
+
if m is None:
|
268
|
+
indices = np.indices(grid_shape)
|
269
|
+
Leig = np.zeros(grid_shape)
|
270
|
+
else:
|
271
|
+
grid_shape_min = min(grid_shape,
|
272
|
+
tuple(np.ones_like(grid_shape) * m))
|
273
|
+
indices = np.indices(grid_shape_min)
|
274
|
+
Leig = np.zeros(grid_shape_min)
|
275
|
+
|
276
|
+
for j, n in zip(indices, grid_shape):
|
277
|
+
if self.boundary_conditions == 'dirichlet':
|
278
|
+
Leig += -4 * np.sin(np.pi * (j + 1) / (2 * (n + 1))) ** 2
|
279
|
+
elif self.boundary_conditions == 'neumann':
|
280
|
+
Leig += -4 * np.sin(np.pi * j / (2 * n)) ** 2
|
281
|
+
else: # boundary_conditions == 'periodic'
|
282
|
+
Leig += -4 * np.sin(np.pi * np.floor((j + 1) / 2) / n) ** 2
|
283
|
+
|
284
|
+
Leig_ravel = Leig.ravel()
|
285
|
+
ind = np.argsort(Leig_ravel)
|
286
|
+
eigenvalues = Leig_ravel[ind]
|
287
|
+
if m is not None:
|
288
|
+
eigenvalues = eigenvalues[-m:]
|
289
|
+
ind = ind[-m:]
|
290
|
+
|
291
|
+
return eigenvalues, ind
|
292
|
+
|
293
|
+
def eigenvalues(self, m=None):
|
294
|
+
"""Return the requested number of eigenvalues.
|
295
|
+
|
296
|
+
Parameters
|
297
|
+
----------
|
298
|
+
m : int, optional
|
299
|
+
The positive number of smallest eigenvalues to return.
|
300
|
+
If not provided, then all eigenvalues will be returned.
|
301
|
+
|
302
|
+
Returns
|
303
|
+
-------
|
304
|
+
eigenvalues : float array
|
305
|
+
The requested `m` smallest or all eigenvalues, in ascending order.
|
306
|
+
"""
|
307
|
+
eigenvalues, _ = self._eigenvalue_ordering(m)
|
308
|
+
return eigenvalues
|
309
|
+
|
310
|
+
def _ev1d(self, j, n):
|
311
|
+
"""Return 1 eigenvector in 1d with index `j`
|
312
|
+
and number of grid points `n` where ``j < n``.
|
313
|
+
"""
|
314
|
+
if self.boundary_conditions == 'dirichlet':
|
315
|
+
i = np.pi * (np.arange(n) + 1) / (n + 1)
|
316
|
+
ev = np.sqrt(2. / (n + 1.)) * np.sin(i * (j + 1))
|
317
|
+
elif self.boundary_conditions == 'neumann':
|
318
|
+
i = np.pi * (np.arange(n) + 0.5) / n
|
319
|
+
ev = np.sqrt((1. if j == 0 else 2.) / n) * np.cos(i * j)
|
320
|
+
else: # boundary_conditions == 'periodic'
|
321
|
+
if j == 0:
|
322
|
+
ev = np.sqrt(1. / n) * np.ones(n)
|
323
|
+
elif j + 1 == n and n % 2 == 0:
|
324
|
+
ev = np.sqrt(1. / n) * np.tile([1, -1], n//2)
|
325
|
+
else:
|
326
|
+
i = 2. * np.pi * (np.arange(n) + 0.5) / n
|
327
|
+
ev = np.sqrt(2. / n) * np.cos(i * np.floor((j + 1) / 2))
|
328
|
+
# make small values exact zeros correcting round-off errors
|
329
|
+
# due to symmetry of eigenvectors the exact 0. is correct
|
330
|
+
ev[np.abs(ev) < np.finfo(np.float64).eps] = 0.
|
331
|
+
return ev
|
332
|
+
|
333
|
+
def _one_eve(self, k):
|
334
|
+
"""Return 1 eigenvector in Nd with multi-index `j`
|
335
|
+
as a tensor product of the corresponding 1d eigenvectors.
|
336
|
+
"""
|
337
|
+
phi = [self._ev1d(j, n) for j, n in zip(k, self.grid_shape)]
|
338
|
+
result = phi[0]
|
339
|
+
for phi in phi[1:]:
|
340
|
+
result = np.tensordot(result, phi, axes=0)
|
341
|
+
return np.asarray(result).ravel()
|
342
|
+
|
343
|
+
def eigenvectors(self, m=None):
|
344
|
+
"""Return the requested number of eigenvectors for ordered eigenvalues.
|
345
|
+
|
346
|
+
Parameters
|
347
|
+
----------
|
348
|
+
m : int, optional
|
349
|
+
The positive number of eigenvectors to return. If not provided,
|
350
|
+
then all eigenvectors will be returned.
|
351
|
+
|
352
|
+
Returns
|
353
|
+
-------
|
354
|
+
eigenvectors : float array
|
355
|
+
An array with columns made of the requested `m` or all eigenvectors.
|
356
|
+
The columns are ordered according to the `m` ordered eigenvalues.
|
357
|
+
"""
|
358
|
+
_, ind = self._eigenvalue_ordering(m)
|
359
|
+
if m is None:
|
360
|
+
grid_shape_min = self.grid_shape
|
361
|
+
else:
|
362
|
+
grid_shape_min = min(self.grid_shape,
|
363
|
+
tuple(np.ones_like(self.grid_shape) * m))
|
364
|
+
|
365
|
+
N_indices = np.unravel_index(ind, grid_shape_min)
|
366
|
+
N_indices = [tuple(x) for x in zip(*N_indices)]
|
367
|
+
eigenvectors_list = [self._one_eve(k) for k in N_indices]
|
368
|
+
return np.column_stack(eigenvectors_list)
|
369
|
+
|
370
|
+
def toarray(self):
|
371
|
+
"""
|
372
|
+
Converts the Laplacian data to a dense array.
|
373
|
+
|
374
|
+
Returns
|
375
|
+
-------
|
376
|
+
L : ndarray
|
377
|
+
The shape is ``(N, N)`` where ``N = np.prod(grid_shape)``.
|
378
|
+
|
379
|
+
"""
|
380
|
+
grid_shape = self.grid_shape
|
381
|
+
n = np.prod(grid_shape)
|
382
|
+
L = np.zeros([n, n], dtype=np.int8)
|
383
|
+
# Scratch arrays
|
384
|
+
L_i = np.empty_like(L)
|
385
|
+
Ltemp = np.empty_like(L)
|
386
|
+
|
387
|
+
for ind, dim in enumerate(grid_shape):
|
388
|
+
# Start zeroing out L_i
|
389
|
+
L_i[:] = 0
|
390
|
+
# Allocate the top left corner with the kernel of L_i
|
391
|
+
# Einsum returns writable view of arrays
|
392
|
+
np.einsum("ii->i", L_i[:dim, :dim])[:] = -2
|
393
|
+
np.einsum("ii->i", L_i[: dim - 1, 1:dim])[:] = 1
|
394
|
+
np.einsum("ii->i", L_i[1:dim, : dim - 1])[:] = 1
|
395
|
+
|
396
|
+
if self.boundary_conditions == 'neumann':
|
397
|
+
L_i[0, 0] = -1
|
398
|
+
L_i[dim - 1, dim - 1] = -1
|
399
|
+
elif self.boundary_conditions == 'periodic':
|
400
|
+
if dim > 1:
|
401
|
+
L_i[0, dim - 1] += 1
|
402
|
+
L_i[dim - 1, 0] += 1
|
403
|
+
else:
|
404
|
+
L_i[0, 0] += 1
|
405
|
+
|
406
|
+
# kron is too slow for large matrices hence the next two tricks
|
407
|
+
# 1- kron(eye, mat) is block_diag(mat, mat, ...)
|
408
|
+
# 2- kron(mat, eye) can be performed by 4d stride trick
|
409
|
+
|
410
|
+
# 1-
|
411
|
+
new_dim = dim
|
412
|
+
# for block_diag we tile the top left portion on the diagonal
|
413
|
+
if ind > 0:
|
414
|
+
tiles = np.prod(grid_shape[:ind])
|
415
|
+
for j in range(1, tiles):
|
416
|
+
L_i[j*dim:(j+1)*dim, j*dim:(j+1)*dim] = L_i[:dim, :dim]
|
417
|
+
new_dim += dim
|
418
|
+
# 2-
|
419
|
+
# we need the keep L_i, but reset the array
|
420
|
+
Ltemp[:new_dim, :new_dim] = L_i[:new_dim, :new_dim]
|
421
|
+
tiles = int(np.prod(grid_shape[ind+1:]))
|
422
|
+
# Zero out the top left, the rest is already 0
|
423
|
+
L_i[:new_dim, :new_dim] = 0
|
424
|
+
idx = [x for x in range(tiles)]
|
425
|
+
L_i.reshape(
|
426
|
+
(new_dim, tiles,
|
427
|
+
new_dim, tiles)
|
428
|
+
)[:, idx, :, idx] = Ltemp[:new_dim, :new_dim]
|
429
|
+
|
430
|
+
L += L_i
|
431
|
+
|
432
|
+
return L.astype(self.dtype)
|
433
|
+
|
434
|
+
def tosparse(self):
|
435
|
+
"""
|
436
|
+
Constructs a sparse array from the Laplacian data. The returned sparse
|
437
|
+
array format is dependent on the selected boundary conditions.
|
438
|
+
|
439
|
+
Returns
|
440
|
+
-------
|
441
|
+
L : scipy.sparse.sparray
|
442
|
+
The shape is ``(N, N)`` where ``N = np.prod(grid_shape)``.
|
443
|
+
|
444
|
+
"""
|
445
|
+
N = len(self.grid_shape)
|
446
|
+
p = np.prod(self.grid_shape)
|
447
|
+
L = dia_array((p, p), dtype=np.int8)
|
448
|
+
|
449
|
+
for i in range(N):
|
450
|
+
dim = self.grid_shape[i]
|
451
|
+
data = np.ones([3, dim], dtype=np.int8)
|
452
|
+
data[1, :] *= -2
|
453
|
+
|
454
|
+
if self.boundary_conditions == 'neumann':
|
455
|
+
data[1, 0] = -1
|
456
|
+
data[1, -1] = -1
|
457
|
+
|
458
|
+
L_i = dia_array((data, [-1, 0, 1]), shape=(dim, dim),
|
459
|
+
dtype=np.int8
|
460
|
+
)
|
461
|
+
|
462
|
+
if self.boundary_conditions == 'periodic':
|
463
|
+
t = dia_array((dim, dim), dtype=np.int8)
|
464
|
+
t.setdiag([1], k=-dim+1)
|
465
|
+
t.setdiag([1], k=dim-1)
|
466
|
+
L_i += t
|
467
|
+
|
468
|
+
for j in range(i):
|
469
|
+
L_i = kron(eye_array(self.grid_shape[j], dtype=np.int8), L_i)
|
470
|
+
for j in range(i + 1, N):
|
471
|
+
L_i = kron(L_i, eye_array(self.grid_shape[j], dtype=np.int8))
|
472
|
+
L += L_i
|
473
|
+
return L.astype(self.dtype)
|
474
|
+
|
475
|
+
def _matvec(self, x):
|
476
|
+
grid_shape = self.grid_shape
|
477
|
+
N = len(grid_shape)
|
478
|
+
X = x.reshape(grid_shape + (-1,))
|
479
|
+
Y = -2 * N * X
|
480
|
+
for i in range(N):
|
481
|
+
Y += np.roll(X, 1, axis=i)
|
482
|
+
Y += np.roll(X, -1, axis=i)
|
483
|
+
if self.boundary_conditions in ('neumann', 'dirichlet'):
|
484
|
+
Y[(slice(None),)*i + (0,) + (slice(None),)*(N-i-1)
|
485
|
+
] -= np.roll(X, 1, axis=i)[
|
486
|
+
(slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
|
487
|
+
]
|
488
|
+
Y[
|
489
|
+
(slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
|
490
|
+
] -= np.roll(X, -1, axis=i)[
|
491
|
+
(slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
|
492
|
+
]
|
493
|
+
|
494
|
+
if self.boundary_conditions == 'neumann':
|
495
|
+
Y[
|
496
|
+
(slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
|
497
|
+
] += np.roll(X, 0, axis=i)[
|
498
|
+
(slice(None),) * i + (0,) + (slice(None),) * (N-i-1)
|
499
|
+
]
|
500
|
+
Y[
|
501
|
+
(slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
|
502
|
+
] += np.roll(X, 0, axis=i)[
|
503
|
+
(slice(None),) * i + (-1,) + (slice(None),) * (N-i-1)
|
504
|
+
]
|
505
|
+
|
506
|
+
return Y.reshape(-1, X.shape[-1])
|
507
|
+
|
508
|
+
def _matmat(self, x):
|
509
|
+
return self._matvec(x)
|
510
|
+
|
511
|
+
def _adjoint(self):
|
512
|
+
return self
|
513
|
+
|
514
|
+
def _transpose(self):
|
515
|
+
return self
|
516
|
+
|
517
|
+
|
518
|
+
class Sakurai(LinearOperator):
|
519
|
+
"""
|
520
|
+
Construct a Sakurai matrix in various formats and its eigenvalues.
|
521
|
+
|
522
|
+
Constructs the "Sakurai" matrix motivated by reference [1]_:
|
523
|
+
square real symmetric positive definite and 5-diagonal
|
524
|
+
with the main diagonal ``[5, 6, 6, ..., 6, 6, 5], the ``+1`` and ``-1``
|
525
|
+
diagonals filled with ``-4``, and the ``+2`` and ``-2`` diagonals
|
526
|
+
made of ``1``. Its eigenvalues are analytically known to be
|
527
|
+
``16. * np.power(np.cos(0.5 * k * np.pi / (n + 1)), 4)``.
|
528
|
+
The matrix gets ill-conditioned with its size growing.
|
529
|
+
It is useful for testing and benchmarking sparse eigenvalue solvers
|
530
|
+
especially those taking advantage of its banded 5-diagonal structure.
|
531
|
+
See the notes below for details.
|
532
|
+
|
533
|
+
Parameters
|
534
|
+
----------
|
535
|
+
n : int
|
536
|
+
The size of the matrix.
|
537
|
+
dtype : dtype
|
538
|
+
Numerical type of the array. Default is ``np.int8``.
|
539
|
+
|
540
|
+
Methods
|
541
|
+
-------
|
542
|
+
toarray()
|
543
|
+
Construct a dense array from Laplacian data
|
544
|
+
tosparse()
|
545
|
+
Construct a sparse array from Laplacian data
|
546
|
+
tobanded()
|
547
|
+
The Sakurai matrix in the format for banded symmetric matrices,
|
548
|
+
i.e., (3, n) ndarray with 3 upper diagonals
|
549
|
+
placing the main diagonal at the bottom.
|
550
|
+
eigenvalues
|
551
|
+
All eigenvalues of the Sakurai matrix ordered ascending.
|
552
|
+
|
553
|
+
Notes
|
554
|
+
-----
|
555
|
+
Reference [1]_ introduces a generalized eigenproblem for the matrix pair
|
556
|
+
`A` and `B` where `A` is the identity so we turn it into an eigenproblem
|
557
|
+
just for the matrix `B` that this function outputs in various formats
|
558
|
+
together with its eigenvalues.
|
559
|
+
|
560
|
+
.. versionadded:: 1.12.0
|
561
|
+
|
562
|
+
References
|
563
|
+
----------
|
564
|
+
.. [1] T. Sakurai, H. Tadano, Y. Inadomi, and U. Nagashima,
|
565
|
+
"A moment-based method for large-scale generalized
|
566
|
+
eigenvalue problems",
|
567
|
+
Appl. Num. Anal. Comp. Math. Vol. 1 No. 2 (2004).
|
568
|
+
|
569
|
+
Examples
|
570
|
+
--------
|
571
|
+
>>> import numpy as np
|
572
|
+
>>> from scipy.sparse.linalg._special_sparse_arrays import Sakurai
|
573
|
+
>>> from scipy.linalg import eig_banded
|
574
|
+
>>> n = 6
|
575
|
+
>>> sak = Sakurai(n)
|
576
|
+
|
577
|
+
Since all matrix entries are small integers, ``'int8'`` is
|
578
|
+
the default dtype for storing matrix representations.
|
579
|
+
|
580
|
+
>>> sak.toarray()
|
581
|
+
array([[ 5, -4, 1, 0, 0, 0],
|
582
|
+
[-4, 6, -4, 1, 0, 0],
|
583
|
+
[ 1, -4, 6, -4, 1, 0],
|
584
|
+
[ 0, 1, -4, 6, -4, 1],
|
585
|
+
[ 0, 0, 1, -4, 6, -4],
|
586
|
+
[ 0, 0, 0, 1, -4, 5]], dtype=int8)
|
587
|
+
>>> sak.tobanded()
|
588
|
+
array([[ 1, 1, 1, 1, 1, 1],
|
589
|
+
[-4, -4, -4, -4, -4, -4],
|
590
|
+
[ 5, 6, 6, 6, 6, 5]], dtype=int8)
|
591
|
+
>>> sak.tosparse()
|
592
|
+
<DIAgonal sparse array of dtype 'int8'
|
593
|
+
with 24 stored elements (5 diagonals) and shape (6, 6)>
|
594
|
+
>>> np.array_equal(sak.dot(np.eye(n)), sak.tosparse().toarray())
|
595
|
+
True
|
596
|
+
>>> sak.eigenvalues()
|
597
|
+
array([0.03922866, 0.56703972, 2.41789479, 5.97822974,
|
598
|
+
10.54287655, 14.45473055])
|
599
|
+
>>> sak.eigenvalues(2)
|
600
|
+
array([0.03922866, 0.56703972])
|
601
|
+
|
602
|
+
The banded form can be used in scipy functions for banded matrices, e.g.,
|
603
|
+
|
604
|
+
>>> e = eig_banded(sak.tobanded(), eigvals_only=True)
|
605
|
+
>>> np.allclose(sak.eigenvalues(), e, atol= n * n * n * np.finfo(float).eps)
|
606
|
+
True
|
607
|
+
|
608
|
+
"""
|
609
|
+
def __init__(self, n, dtype=np.int8):
|
610
|
+
self.n = n
|
611
|
+
self.dtype = dtype
|
612
|
+
shape = (n, n)
|
613
|
+
super().__init__(dtype, shape)
|
614
|
+
|
615
|
+
def eigenvalues(self, m=None):
|
616
|
+
"""Return the requested number of eigenvalues.
|
617
|
+
|
618
|
+
Parameters
|
619
|
+
----------
|
620
|
+
m : int, optional
|
621
|
+
The positive number of smallest eigenvalues to return.
|
622
|
+
If not provided, then all eigenvalues will be returned.
|
623
|
+
|
624
|
+
Returns
|
625
|
+
-------
|
626
|
+
eigenvalues : `np.float64` array
|
627
|
+
The requested `m` smallest or all eigenvalues, in ascending order.
|
628
|
+
"""
|
629
|
+
if m is None:
|
630
|
+
m = self.n
|
631
|
+
k = np.arange(self.n + 1 -m, self.n + 1)
|
632
|
+
return np.flip(16. * np.power(np.cos(0.5 * k * np.pi / (self.n + 1)), 4))
|
633
|
+
|
634
|
+
def tobanded(self):
|
635
|
+
"""
|
636
|
+
Construct the Sakurai matrix as a banded array.
|
637
|
+
"""
|
638
|
+
d0 = np.r_[5, 6 * np.ones(self.n - 2, dtype=self.dtype), 5]
|
639
|
+
d1 = -4 * np.ones(self.n, dtype=self.dtype)
|
640
|
+
d2 = np.ones(self.n, dtype=self.dtype)
|
641
|
+
return np.array([d2, d1, d0]).astype(self.dtype)
|
642
|
+
|
643
|
+
def tosparse(self):
|
644
|
+
"""
|
645
|
+
Construct the Sakurai matrix in a sparse format.
|
646
|
+
"""
|
647
|
+
from scipy.sparse import diags_array
|
648
|
+
d = self.tobanded()
|
649
|
+
# the banded format has the main diagonal at the bottom
|
650
|
+
# `diags_array` inherits dtype from banded
|
651
|
+
return diags_array([d[0], d[1], d[2], d[1], d[0]], offsets=[-2, -1, 0, 1, 2],
|
652
|
+
shape=(self.n, self.n), dtype=d.dtype)
|
653
|
+
|
654
|
+
def toarray(self):
|
655
|
+
return self.tosparse().toarray()
|
656
|
+
|
657
|
+
def _matvec(self, x):
|
658
|
+
"""
|
659
|
+
Construct matrix-free callable banded-matrix-vector multiplication by
|
660
|
+
the Sakurai matrix without constructing or storing the matrix itself
|
661
|
+
using the knowledge of its entries and the 5-diagonal format.
|
662
|
+
"""
|
663
|
+
x = x.reshape(self.n, -1)
|
664
|
+
result_dtype = np.promote_types(x.dtype, self.dtype)
|
665
|
+
sx = np.zeros_like(x, dtype=result_dtype)
|
666
|
+
sx[0, :] = 5 * x[0, :] - 4 * x[1, :] + x[2, :]
|
667
|
+
sx[-1, :] = 5 * x[-1, :] - 4 * x[-2, :] + x[-3, :]
|
668
|
+
sx[1: -1, :] = (6 * x[1: -1, :] - 4 * (x[:-2, :] + x[2:, :])
|
669
|
+
+ np.pad(x[:-3, :], ((1, 0), (0, 0)))
|
670
|
+
+ np.pad(x[3:, :], ((0, 1), (0, 0))))
|
671
|
+
return sx
|
672
|
+
|
673
|
+
def _matmat(self, x):
|
674
|
+
"""
|
675
|
+
Construct matrix-free callable matrix-matrix multiplication by
|
676
|
+
the Sakurai matrix without constructing or storing the matrix itself
|
677
|
+
by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
|
678
|
+
"""
|
679
|
+
return self._matvec(x)
|
680
|
+
|
681
|
+
def _adjoint(self):
|
682
|
+
return self
|
683
|
+
|
684
|
+
def _transpose(self):
|
685
|
+
return self
|
686
|
+
|
687
|
+
|
688
|
+
class MikotaM(LinearOperator):
|
689
|
+
"""
|
690
|
+
Construct a mass matrix in various formats of Mikota pair.
|
691
|
+
|
692
|
+
The mass matrix `M` is square real diagonal
|
693
|
+
positive definite with entries that are reciprocal to integers.
|
694
|
+
|
695
|
+
Parameters
|
696
|
+
----------
|
697
|
+
shape : tuple of int
|
698
|
+
The shape of the matrix.
|
699
|
+
dtype : dtype
|
700
|
+
Numerical type of the array. Default is ``np.float64``.
|
701
|
+
|
702
|
+
Methods
|
703
|
+
-------
|
704
|
+
toarray()
|
705
|
+
Construct a dense array from Mikota data
|
706
|
+
tosparse()
|
707
|
+
Construct a sparse array from Mikota data
|
708
|
+
tobanded()
|
709
|
+
The format for banded symmetric matrices,
|
710
|
+
i.e., (1, n) ndarray with the main diagonal.
|
711
|
+
"""
|
712
|
+
def __init__(self, shape, dtype=np.float64):
|
713
|
+
self.shape = shape
|
714
|
+
self.dtype = dtype
|
715
|
+
super().__init__(dtype, shape)
|
716
|
+
|
717
|
+
def _diag(self):
|
718
|
+
# The matrix is constructed from its diagonal 1 / [1, ..., N+1];
|
719
|
+
# compute in a function to avoid duplicated code & storage footprint
|
720
|
+
return (1. / np.arange(1, self.shape[0] + 1)).astype(self.dtype)
|
721
|
+
|
722
|
+
def tobanded(self):
|
723
|
+
return self._diag()
|
724
|
+
|
725
|
+
def tosparse(self):
|
726
|
+
from scipy.sparse import diags_array
|
727
|
+
return diags_array([self._diag()], offsets=[0],
|
728
|
+
shape=self.shape, dtype=self.dtype)
|
729
|
+
|
730
|
+
def toarray(self):
|
731
|
+
return np.diag(self._diag()).astype(self.dtype)
|
732
|
+
|
733
|
+
def _matvec(self, x):
|
734
|
+
"""
|
735
|
+
Construct matrix-free callable banded-matrix-vector multiplication by
|
736
|
+
the Mikota mass matrix without constructing or storing the matrix itself
|
737
|
+
using the knowledge of its entries and the diagonal format.
|
738
|
+
"""
|
739
|
+
x = x.reshape(self.shape[0], -1)
|
740
|
+
return self._diag()[:, np.newaxis] * x
|
741
|
+
|
742
|
+
def _matmat(self, x):
|
743
|
+
"""
|
744
|
+
Construct matrix-free callable matrix-matrix multiplication by
|
745
|
+
the Mikota mass matrix without constructing or storing the matrix itself
|
746
|
+
by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
|
747
|
+
"""
|
748
|
+
return self._matvec(x)
|
749
|
+
|
750
|
+
def _adjoint(self):
|
751
|
+
return self
|
752
|
+
|
753
|
+
def _transpose(self):
|
754
|
+
return self
|
755
|
+
|
756
|
+
|
757
|
+
class MikotaK(LinearOperator):
|
758
|
+
"""
|
759
|
+
Construct a stiffness matrix in various formats of Mikota pair.
|
760
|
+
|
761
|
+
The stiffness matrix `K` is square real tri-diagonal symmetric
|
762
|
+
positive definite with integer entries.
|
763
|
+
|
764
|
+
Parameters
|
765
|
+
----------
|
766
|
+
shape : tuple of int
|
767
|
+
The shape of the matrix.
|
768
|
+
dtype : dtype
|
769
|
+
Numerical type of the array. Default is ``np.int32``.
|
770
|
+
|
771
|
+
Methods
|
772
|
+
-------
|
773
|
+
toarray()
|
774
|
+
Construct a dense array from Mikota data
|
775
|
+
tosparse()
|
776
|
+
Construct a sparse array from Mikota data
|
777
|
+
tobanded()
|
778
|
+
The format for banded symmetric matrices,
|
779
|
+
i.e., (2, n) ndarray with 2 upper diagonals
|
780
|
+
placing the main diagonal at the bottom.
|
781
|
+
"""
|
782
|
+
def __init__(self, shape, dtype=np.int32):
|
783
|
+
self.shape = shape
|
784
|
+
self.dtype = dtype
|
785
|
+
super().__init__(dtype, shape)
|
786
|
+
# The matrix is constructed from its diagonals;
|
787
|
+
# we precompute these to avoid duplicating the computation
|
788
|
+
n = shape[0]
|
789
|
+
self._diag0 = np.arange(2 * n - 1, 0, -2, dtype=self.dtype)
|
790
|
+
self._diag1 = - np.arange(n - 1, 0, -1, dtype=self.dtype)
|
791
|
+
|
792
|
+
def tobanded(self):
|
793
|
+
return np.array([np.pad(self._diag1, (1, 0), 'constant'), self._diag0])
|
794
|
+
|
795
|
+
def tosparse(self):
|
796
|
+
from scipy.sparse import diags_array
|
797
|
+
return diags_array([self._diag1, self._diag0, self._diag1], offsets=[-1, 0, 1],
|
798
|
+
shape=self.shape, dtype=self.dtype)
|
799
|
+
|
800
|
+
def toarray(self):
|
801
|
+
return self.tosparse().toarray()
|
802
|
+
|
803
|
+
def _matvec(self, x):
|
804
|
+
"""
|
805
|
+
Construct matrix-free callable banded-matrix-vector multiplication by
|
806
|
+
the Mikota stiffness matrix without constructing or storing the matrix
|
807
|
+
itself using the knowledge of its entries and the 3-diagonal format.
|
808
|
+
"""
|
809
|
+
x = x.reshape(self.shape[0], -1)
|
810
|
+
result_dtype = np.promote_types(x.dtype, self.dtype)
|
811
|
+
kx = np.zeros_like(x, dtype=result_dtype)
|
812
|
+
d1 = self._diag1
|
813
|
+
d0 = self._diag0
|
814
|
+
kx[0, :] = d0[0] * x[0, :] + d1[0] * x[1, :]
|
815
|
+
kx[-1, :] = d1[-1] * x[-2, :] + d0[-1] * x[-1, :]
|
816
|
+
kx[1: -1, :] = (d1[:-1, None] * x[: -2, :]
|
817
|
+
+ d0[1: -1, None] * x[1: -1, :]
|
818
|
+
+ d1[1:, None] * x[2:, :])
|
819
|
+
return kx
|
820
|
+
|
821
|
+
def _matmat(self, x):
|
822
|
+
"""
|
823
|
+
Construct matrix-free callable matrix-matrix multiplication by
|
824
|
+
the Stiffness mass matrix without constructing or storing the matrix itself
|
825
|
+
by reusing the ``_matvec(x)`` that supports both 1D and 2D arrays ``x``.
|
826
|
+
"""
|
827
|
+
return self._matvec(x)
|
828
|
+
|
829
|
+
def _adjoint(self):
|
830
|
+
return self
|
831
|
+
|
832
|
+
def _transpose(self):
|
833
|
+
return self
|
834
|
+
|
835
|
+
|
836
|
+
class MikotaPair:
|
837
|
+
"""
|
838
|
+
Construct the Mikota pair of matrices in various formats and
|
839
|
+
eigenvalues of the generalized eigenproblem with them.
|
840
|
+
|
841
|
+
The Mikota pair of matrices [1, 2]_ models a vibration problem
|
842
|
+
of a linear mass-spring system with the ends attached where
|
843
|
+
the stiffness of the springs and the masses increase along
|
844
|
+
the system length such that vibration frequencies are subsequent
|
845
|
+
integers 1, 2, ..., `n` where `n` is the number of the masses. Thus,
|
846
|
+
eigenvalues of the generalized eigenvalue problem for
|
847
|
+
the matrix pair `K` and `M` where `K` is the system stiffness matrix
|
848
|
+
and `M` is the system mass matrix are the squares of the integers,
|
849
|
+
i.e., 1, 4, 9, ..., ``n * n``.
|
850
|
+
|
851
|
+
The stiffness matrix `K` is square real tri-diagonal symmetric
|
852
|
+
positive definite. The mass matrix `M` is diagonal with diagonal
|
853
|
+
entries 1, 1/2, 1/3, ...., ``1/n``. Both matrices get
|
854
|
+
ill-conditioned with `n` growing.
|
855
|
+
|
856
|
+
Parameters
|
857
|
+
----------
|
858
|
+
n : int
|
859
|
+
The size of the matrices of the Mikota pair.
|
860
|
+
dtype : dtype
|
861
|
+
Numerical type of the array. Default is ``np.float64``.
|
862
|
+
|
863
|
+
Attributes
|
864
|
+
----------
|
865
|
+
eigenvalues : 1D ndarray, ``np.uint64``
|
866
|
+
All eigenvalues of the Mikota pair ordered ascending.
|
867
|
+
|
868
|
+
Methods
|
869
|
+
-------
|
870
|
+
MikotaK()
|
871
|
+
A `LinearOperator` custom object for the stiffness matrix.
|
872
|
+
MikotaM()
|
873
|
+
A `LinearOperator` custom object for the mass matrix.
|
874
|
+
|
875
|
+
.. versionadded:: 1.12.0
|
876
|
+
|
877
|
+
References
|
878
|
+
----------
|
879
|
+
.. [1] J. Mikota, "Frequency tuning of chain structure multibody oscillators
|
880
|
+
to place the natural frequencies at omega1 and N-1 integer multiples
|
881
|
+
omega2,..., omegaN", Z. Angew. Math. Mech. 81 (2001), S2, S201-S202.
|
882
|
+
Appl. Num. Anal. Comp. Math. Vol. 1 No. 2 (2004).
|
883
|
+
.. [2] Peter C. Muller and Metin Gurgoze,
|
884
|
+
"Natural frequencies of a multi-degree-of-freedom vibration system",
|
885
|
+
Proc. Appl. Math. Mech. 6, 319-320 (2006).
|
886
|
+
http://dx.doi.org/10.1002/pamm.200610141.
|
887
|
+
|
888
|
+
Examples
|
889
|
+
--------
|
890
|
+
>>> import numpy as np
|
891
|
+
>>> from scipy.sparse.linalg._special_sparse_arrays import MikotaPair
|
892
|
+
>>> n = 6
|
893
|
+
>>> mik = MikotaPair(n)
|
894
|
+
>>> mik_k = mik.k
|
895
|
+
>>> mik_m = mik.m
|
896
|
+
>>> mik_k.toarray()
|
897
|
+
array([[11., -5., 0., 0., 0., 0.],
|
898
|
+
[-5., 9., -4., 0., 0., 0.],
|
899
|
+
[ 0., -4., 7., -3., 0., 0.],
|
900
|
+
[ 0., 0., -3., 5., -2., 0.],
|
901
|
+
[ 0., 0., 0., -2., 3., -1.],
|
902
|
+
[ 0., 0., 0., 0., -1., 1.]])
|
903
|
+
>>> mik_k.tobanded()
|
904
|
+
array([[ 0., -5., -4., -3., -2., -1.],
|
905
|
+
[11., 9., 7., 5., 3., 1.]])
|
906
|
+
>>> mik_m.tobanded()
|
907
|
+
array([1. , 0.5 , 0.33333333, 0.25 , 0.2 ,
|
908
|
+
0.16666667])
|
909
|
+
>>> mik_k.tosparse()
|
910
|
+
<DIAgonal sparse array of dtype 'float64'
|
911
|
+
with 16 stored elements (3 diagonals) and shape (6, 6)>
|
912
|
+
>>> mik_m.tosparse()
|
913
|
+
<DIAgonal sparse array of dtype 'float64'
|
914
|
+
with 6 stored elements (1 diagonals) and shape (6, 6)>
|
915
|
+
>>> np.array_equal(mik_k(np.eye(n)), mik_k.toarray())
|
916
|
+
True
|
917
|
+
>>> np.array_equal(mik_m(np.eye(n)), mik_m.toarray())
|
918
|
+
True
|
919
|
+
>>> mik.eigenvalues()
|
920
|
+
array([ 1, 4, 9, 16, 25, 36])
|
921
|
+
>>> mik.eigenvalues(2)
|
922
|
+
array([ 1, 4])
|
923
|
+
|
924
|
+
"""
|
925
|
+
def __init__(self, n, dtype=np.float64):
|
926
|
+
self.n = n
|
927
|
+
self.dtype = dtype
|
928
|
+
self.shape = (n, n)
|
929
|
+
self.m = MikotaM(self.shape, self.dtype)
|
930
|
+
self.k = MikotaK(self.shape, self.dtype)
|
931
|
+
|
932
|
+
def eigenvalues(self, m=None):
|
933
|
+
"""Return the requested number of eigenvalues.
|
934
|
+
|
935
|
+
Parameters
|
936
|
+
----------
|
937
|
+
m : int, optional
|
938
|
+
The positive number of smallest eigenvalues to return.
|
939
|
+
If not provided, then all eigenvalues will be returned.
|
940
|
+
|
941
|
+
Returns
|
942
|
+
-------
|
943
|
+
eigenvalues : `np.uint64` array
|
944
|
+
The requested `m` smallest or all eigenvalues, in ascending order.
|
945
|
+
"""
|
946
|
+
if m is None:
|
947
|
+
m = self.n
|
948
|
+
arange_plus1 = np.arange(1, m + 1, dtype=np.uint64)
|
949
|
+
return arange_plus1 * arange_plus1
|