SciPy library main repository

Overview

SciPy logo SciPy

https://img.shields.io/circleci/project/github/scipy/scipy/master.svg?label=CircleCI https://dev.azure.com/scipy-org/SciPy/_apis/build/status/scipy.scipy?branchName=master https://github.com/scipy/scipy/workflows/macOS%20tests/badge.svg?branch=master https://img.shields.io/pypi/dm/scipy.svg?label=Pypi%20downloads https://img.shields.io/conda/dn/conda-forge/scipy.svg?label=Conda%20downloads https://img.shields.io/badge/DOI-10.1038%2Fs41592--019--0686--2-blue

SciPy (pronounced "Sigh Pie") is an open-source software for mathematics, science, and engineering. It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and more.

SciPy is built to work with NumPy arrays, and provides many user-friendly and efficient numerical routines, such as routines for numerical integration and optimization. Together, they run on all popular operating systems, are quick to install, and are free of charge. NumPy and SciPy are easy to use, but powerful enough to be depended upon by some of the world's leading scientists and engineers. If you need to manipulate numbers on a computer and display or publish the results, give SciPy a try!

For the installation instructions, see our install guide.

Call for Contributions

We appreciate and welcome contributions. Small improvements or fixes are always appreciated; issues labeled as "good first issue" may be a good starting point. Have a look at our contributing guide.

Writing code isn’t the only way to contribute to SciPy. You can also:

  • review pull requests
  • triage issues
  • develop tutorials, presentations, and other educational materials
  • maintain and improve our website
  • develop graphic design for our brand assets and promotional materials
  • help with outreach and onboard new contributors
  • write grant proposals and help with other fundraising efforts

If you’re unsure where to start or how your skills fit in, reach out! You can ask on the mailing list or here, on GitHub, by leaving a comment on a relevant issue that is already open.

If you are new to contributing to open source, this guide helps explain why, what, and how to get involved.

https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A
Comments
  • ENH: improvements to the Stable distribution

    ENH: improvements to the Stable distribution

    Improve performance/stability for piecewise approach especially when alpha = 1. Replace Mitnik FFT with Wang's better Simpson approach. Correct location / scale for alpha = 1. Introduce multiple parameterizations including original S1 and new S0. Correct typo in rvs for alpha = 1. Improve testing by using sample points based on percentiles.

    scipy.stats maintenance C/C++ Cython 
    opened by bsdz 207
  • ENH: New ODE solvers

    ENH: New ODE solvers

    Hi!

    First some considerations about the current ode class.

    1. It allows to use several good quality solvers.
    2. It feels like a giant black box, the usability and docs are not the best. It's hard to understand if you get your setup right or not, seeing output from fortran code is awkward, etc.
    3. It's not clear how to efficiently compute the solution at many points ("dense output"). For Runge-Kutta methods (dopri5 and dop853) just calling integrate by small steps would be very wrong, but that's what a user would probably do (a "proper" way is discussed here) . For other solvers the situation should be better, but still it is not efficient to make small steps (but this is limitation of solvers and not on scipy side).
    4. No continuous solution output, i.e. which can be evaluated at any point with the same accuracy as the values computed at discrete points.
    5. No event detection capabilities.

    So I want to provide a new monolithic implementation, which is easy to understand and use and also provides missing features 4 and 5. Yes, it will be in Python and not as fast. But the same situation is in MATLAB and people are totally fine with it, as the solvers are well designed and easy to use. In fact I was largely motivated by MATLAB suite. I realize that this is not a super clear situation, and there are pros and cons. But comparing the current state of scipy and MATLAB in ODE integration, I come to conclusion that scipy could do better.

    Currently I only implemented two explicit Runge-Kutta methods (admittedly the easiest methods, but no doubt useful). And getting right implicit solvers for stiff problems will be a challenge.

    I prepared an example with two main features, continuous output and event detection: http://nbviewer.jupyter.org/gist/nmayorov/ca99381bb20a87762758f7dad4fc2220

    The code is in preliminary stage. The current TODO list:

    • [x] Implement at least one implicit method for stiff problems.
    • [x] Refine API: add necessary parameters, rename current parameters, etc.
    • [ x ] Develop a benchmark suite and assess quality of the algorithms.

    Any feedback and suggestions are very welcome. A concrete technical question: which implicit method you believe would be the most useful (if implement only one)? The BDF (and its modifications) seems to be the most widely used, so I want to start looking into it.

    enhancement scipy.integrate 
    opened by nmayorov 183
  • ENH: optimize: add HiGHS methods to linprog

    ENH: optimize: add HiGHS methods to linprog

    Add linprog interface to the HiGHS LP solvers wrapped by @mckib2 in scikit-highs.

    Partially addresses gh-11673. This adds just the linear programming functionality; MIP functionality will come in a separate PR.

    enhancement scipy.optimize 
    opened by mdhaber 167
  • ENH: Add Chirp Z-transform, zoom FFT

    ENH: Add Chirp Z-transform, zoom FFT

    Merging public domain functions written by Paul Kienzle, Nadav Horesh (same as @pkienzle and @Nadav-Horesh?)

    Feature request: https://github.com/scipy/scipy/issues/4288

    To do

    • [x] Should ScaledFFT be removed?
    • [x] Decide whether to include scale parameter in CZT (Not the same thing as ScaledFFT)
    • [x] ~~Should it really return a view on a much larger array, or do ascontiguousarray internally?~~
      • Docstring was wrong
    • [x] Returns sections should be removed from class docstrings? How to document that it returns a callable function though?
    • [x] Should Fs= be capitalized?
    • [x] The following note is misleading: "However, the chirp z-transform is considerably less precise than the equivalent zero-padded FFT, with differences on the order of 1e-7 from the direct transform rather than 1e-15 as seen with zero-padding."
      • "I would suggest to simply state that the czt is less precise without giving numbers."
    • [x] for a, we could calculate the angle first and then project to the complex plane #4607 (comment).
    • [x] Replacing k**2 by (k**2)%(2*m) should help a lot. #4607 (comment)
    • [x] from __future__ import division, absolute_import, print_function
    • [ ] If a test, belongs in the test file. If intended more as a demo/debugging tool, might include it in the documentation somewhere. https://github.com/scipy/scipy/pull/4607#discussion_r25993304
    • [ ] The tests and demos need to be moved out of the function implementation file. https://github.com/scipy/scipy/pull/4607#issuecomment-77673555
    • [ ] The demos might be best in a demo tutorial in the documentation. https://github.com/scipy/scipy/pull/4607#issuecomment-77673555
    • [x] Use assert_(...) for tests.
    • [x] Probably stick to test_ for the prefix.
      • These aren't test functions, they are called by test functions
    • [x] Spaces around +, - operators. Might want to run pep8 on this for style.
    • [x] Comments instead of docstrings in tests.
    • [x] Best to have a fixed seed for reproducibility.
    • [x] Imports need fixing.
    • [x] How about moving _next_regular and its tests to a new file
    • [ ] The CZT and ZoomFFT __init__() methods are now duplicating some code, could maybe be deduplicated. https://github.com/scipy/scipy/pull/4607#issuecomment-167426818
      • Not sure how to do this cleanly or if it's worthwhile
    • [ ] make sure monkeypatching with pyfftw works https://github.com/scipy/scipy/pull/4607#issuecomment-147018053
    • [ ] but replacing the calculation of wk with this seems to help https://github.com/scipy/scipy/pull/4607#discussion_r63880528
    • [x] The calculation in the w is None branch definitely can be replaced by wk2 = np.exp(-1j * pi * ((kk) % (2m)) / m) to increase accuracy.
    • [x] That also has averaging and windowing etc that aren't included here.
    • [x] I believe adding the word callable makes this crystal clear. Same for ZoomFFT
    • [ ] Since we have an explicit expression for a, we could calculate the angle first and then project to the complex plane, i.e. something like https://github.com/scipy/scipy/pull/4607#discussion_r506251925
    • [x] ERROR: objects in scipy.fft.all but not in refguide::
    • [x] When accessing scipy.fft.doc, you will see these descriptions.
    • [x] should I change them to use assert_allclose?
    • [ ] For every "full circle" made in the exponent, the error of the result grows by roughly 1e-16. This can only be fixed by perfect range reduction https://github.com/scipy/scipy/pull/4607#issuecomment-712741842
    • [ ] Just to illustrate my point about the complex exponentials: https://github.com/scipy/scipy/pull/4607#issuecomment-712747249
    • [ ] add an rtol parameter to check_czt and check_zoomfft https://github.com/scipy/scipy/pull/4607#issuecomment-712772808
    • [ ] use check_czt and check_zoomfft exclusively instead of manually calling fft and czt https://github.com/scipy/scipy/pull/4607#issuecomment-712772808
    • [ ] set the tolerance dynamically, based on the length of the transform https://github.com/scipy/scipy/pull/4607#issuecomment-712772808
    • [x] a view on a much larger array is because it literally says so in the docstring:
    • [x] could be confusing to users to have the class-based and function-based entities differ only by capitalization.
    • [x] docstrings could be more consistent in language. I.e., zoomfft describes x as "The input signal" while czt uses "the signal to transform."
    • [x] axis argument is described in terms of "dimension," but in places like fft.fft axis is described as "Axis over which to compute the FFT. If not given, the last axis is used."
    • [x] czt_points should get "See Also" links to czt and CZT
    • [x] The functions and classes should get "See Also" links to their counterparts.
    • [x] There are some formatting tricks to get arguments mentioned in the "Notes" section to show up like x, this would help the ZoomFFT "Notes" section in particular
    • [x] It's not clear to me what is implied by referring to ZoomFFT as "friendlier" in the CZT "See Also" section. More efficient?
    • [x] fftshift isn't used anywhere.
    • [x] I would just call it a "callable class instance". See for example interp1d which operates this way
    • [x] How about having a parameter endpoint=False like numpy.linspace?
    • [x] Decision: endpoint= defaults to true or false?? https://github.com/scipy/scipy/pull/4607#issuecomment-739552809
    • [x] Decision: Zoom FFT would fit better in scipy.signal than in scipy.fft / are these transforms better suited in signal alongside other spectral transforms e.g. cwt and stft? https://github.com/scipy/scipy/pull/4607#issuecomment-739552444
    • [x] Make sure this is compatible with future more accurate PR
    • [x] PEP8: snake_case for zoom_fft() would technically be more correct? https://github.com/scipy/scipy/pull/4607#issuecomment-739552575
    • [x] DOC: make sure bluestein implementation vs CZT transform is clear in the documentation I think it would be correct to say that Bluestein's algorithm is an implementation of CZT.
    • [x] DOC: This paragraph is obsolete.
    • [ ] DOC: Any references we can add to ZoomFFT for this implementation? reference for Zoom FFT using CZT clarify steps in comment https://github.com/scipy/scipy/pull/4607#issuecomment-715671479
    • [x] DOC: CZT is the only one with reference information
    • [x] DOC: The function versions don't have examples; the ones from the classes can be copied over.
    • [ ] DOC: The czt vs fft example is probably no longer true with pocketfft: https://github.com/scipy/scipy/pull/4607#issuecomment-711037717
    • [ ] DOC: ZoomFFT is more accurate because it involves fewer operations. https://github.com/scipy/scipy/pull/4607#issuecomment-737444787
    • [ ] DOC: So the "pre-compiled" version is actually a bit faster than pocketfft? https://github.com/scipy/scipy/pull/4607#issuecomment-716056616
    • [ ] DOC: So the "pre-compiled" version is faster than truncating an oversampled FFT, so that's good. https://github.com/scipy/scipy/pull/4607#issuecomment-716056616
    • [ ] TST: I can't see the w parameter tested anywhere here even though it's being looped over. https://github.com/scipy/scipy/pull/4607#discussion_r523778355

    Possible future PRs

    • as well as w=(rad, nom, denom) or w=(rad, Fraction(nom, denom)) [different PR]
      • However, I think the parameter a should be split into modulus and phase, too, for consistency.
      • Or use an interface like numpy.geomspace with endpoints specified and number of steps and it uses the shortest arc between them?
    • ZoomFFT object should have a .fftfreq() equivalent method. [different PR]
      • and corresponding zoomfftfreq() function, like https://gist.github.com/aluchies/5841673
    • Add ScaledFFT?
    enhancement scipy.signal 
    opened by endolith 155
  • ENH: Add second-order sections filtering

    ENH: Add second-order sections filtering

    With @endolith, we've put together a working version of second-order sections. Closes #2444.

    This PR contains:

    1. sosfilt, which performs filtering using second-order sections.
    2. zpk2sos / tf2sos to convert to sos format. We might actually want to remove tf2sos. I'm worried that users might have filters in tf form and think that going to sos will reduce numerical error. Forcing them to do zp2sos(tf2zpk(b, a)) might make them think twice about why there isn't a tf2sos function. I'm interested to hear other opinions on this...?
    3. cplxpair and cplxreal, which are helper functions for dealing with complex conjugate pairings.

    Implementing filtfilt-equivalent functionality should be very easy, but I think we should tackle that with #3259 as opposed to adding another function here.

    One other thing missing is lfiltic-equivalent functionality. This will require some state-space gymnastics that I haven't managed to solve (despite some effort). I'll try to figure it out, but I think that could be left to a subsequent PR, especially since this one is already pretty big.

    enhancement scipy.signal 
    opened by larsoner 153
  • ENH: Cython api for lapack and blas

    ENH: Cython api for lapack and blas

    • [x] Add interface for lapack and blas routines.
    • [x] Add working example in tests
    • [x] Review signatures for correctness
    • [x] Add function to get directory of scipy.linalg (similar to numpy.get_include)
    • [x] Finish wrappers for 'gees' and 'gges' functions.
    • [x] Add interfaces to the functions added in https://github.com/scipy/scipy/pull/3984
    • [x] Add this api to the documentation
    enhancement scipy.linalg 
    opened by insertinterestingnamehere 149
  • Adds keyword argument to choose faster convolution method

    Adds keyword argument to choose faster convolution method

    As mentioned in #2651, this PR adds the keyword argument method to scipy.signal.convolve to choose the choose the convolution method. method can take vales 'auto', 'fft' or 'direct'.

    In scikit-image PR 1792 we chose the faster convolution method, either the direct method or with fftconvolve. We merged these changes in, and I am merging these changes upstream.

    Timing comparison

    In the plot below, the ratio fft_time / direct_time is plotted with a log scaling. (more detail can be found in the scikit-image PR). These plots are lifted from the scikit-image PR.

    06ad4864-9f78-11e5-99a4-abbd7a5f63ed

    In the plot below, the fit values to this ratio are shown. If this ratio is less than 1, this PR chooses to use fftconvolve.

    7cfdbe20-a1aa-11e5-918c-cfd2f187b560

    The complete code and data to generate these plots are in a gist. These timings were performed on a Mid-2012 Macbook Air.

    Tests

    Tests on my machine failed to build. However, my own test passes:

    for pwr in [4, 5, 6, 7, 8, 9, 10, 11, 12]:
        for _ in range(int(1e3)):
            x = np.random.rand(2**pwr)
            h = np.random.rand((2**pwr)//10)
    
            y1 = convolve(x, h, method='fft')
            y2 = convolve(x, h, method='direct')
    
            assert np.allclose(y1, y2), "convolve should give equivalent answers"
    

    Documentation

    This PR includes documentation of this keyword argument in the docstring. I tried to follow the form of the mode keyword argument.

    enhancement scipy.signal 
    opened by stsievert 148
  • ENH: Adding DIRECT algorithm to ``scipy.optimize``

    ENH: Adding DIRECT algorithm to ``scipy.optimize``

    Reference issue

    Closes https://github.com/scipy/scipy/issues/14121

    What does this implement/fix?

    This PR integrates DIRECT algorithm implementation (this section of NLopt is MIT licensed), https://github.com/stevengj/nlopt/tree/master/src/algs/direct in scipy.optimize.

    Additional information

    ping @dschmitz89 @andim @rgommers I will be updating this PR for DIRECT algorithm.

    EDIT: add latest benchmark results in this PR to the PR description:

    See https://github.com/scipy/scipy/pull/14300#issuecomment-997334807 for enabling benchmarks for direct.

    From https://github.com/scipy/scipy/pull/14300#issuecomment-991409745 by @mdhaber:

    This is definitely a useful addition to our global optimization offerings. With default settings, direct successfully solves 156 out of our 195 benchmark problems. (The benchmarks define success as finding input x that produces output fun(x) within 1e-5 of the global optimum.)

    image ("DA" is dual_annealing, "DE" is differential_evolution, "Direct" is direct, "SHGO" is shgo, and "basinh" is basinhopping)

    One problem, "UrsemWaves", is solved only by direct.

    The number of function evaluations before termination is essentially always the maximum allowed - 20k. The following plot shows horizontal histograms (for 195 problems) of the log10 of number of function evaluations performed. image

    For problems with inexpensive function evaluations, like the ones in the benchmark suite, direct is competitive with the other solvers in terms of execution time. The following plot shows horizontal histograms (for 195 problems) of the log10 of execution time. image

    I think it's worth looking into the termination criteria. Perhaps direct would be much faster overall if it could terminate before reaching the maximum number of function evaluations. (I haven't checked, but it might currently be more accurate with default settings than the other methods. Right now, the global benchmarks only track "success", not quantitative accuracy.)

    From https://github.com/scipy/scipy/pull/14300#issuecomment-1001043193 by @dschmitz89:

    Hi everyone,

    using Matt's code snippet benchmarking was indeed easier than expected. And most importantly, DIRECT has impressive performance. To make sure nothing went wrong, I also did another benchmark using nlopt's DIRECT and DIRECT_L implementations which were written from scratch and not based on the old Fortran implementation (bottom).

    Changes I applied before:

    • removed all conversion to percentages for the tolerances from user input and in the termination checks itself. Observations: Actually, sigmaper was not in percent at all. From how I understand the sometimes obscurely written code now, sigmaper is the length of the largest side of the hyperrectangle containing the current best minimum.
    • Both termination criteria should definitely be renamed for scipy. Suggestion: ivol_tol_abs and ilen_tol_abs.
    • Success criterion: relative error between found and actual global minimum < 1e-4 (error = (res.fun - f_opt)/(f_opt or 1)). Scipy's Benchmark suite uses 1e-5. Reasonin: DIRECT does not use any local optimizer, so in my opinion it should not be expected to find the global minimum with highest precision (running a local optimizer afterwards should be recommended). Scipy's other optimizers have a clear advantage in that sense. The results also pretty much stay the same with a threshold of 1e-5.
    • Tracked reason for termination (which are called vol_per or sigma_per at the moment)

    About the benchmark results:

    • In my opinion the locally biased variant (top plots) should definitely stay the default variant due to the largely reduced number of function evaluations compared to the original algorithm (bottom plots) even if the original variant solves a handful more problems.
    • More parameter sets can be tested out easily.
    • Which parameters should become default? I would opt for v_tol=1e-14 and s_tol=1e-7 (orange line). Gives a good balance between speed and accuracy in my opinion.
    • Results are consistent with NLopt!

    DIRECT_L_1e-4_rel_error DIRECT_Original_1e-4_rel_error

    NLopt benchmark: DIRECT_NLopt_Results

    enhancement scipy.optimize 
    opened by czgdp1807 145
  • MAINT: Increase minimum required LAPACK version to 3.3.1

    MAINT: Increase minimum required LAPACK version to 3.3.1

    This needs some discussion on the mailing list.

    It increases the minimum required LAPACK version to 3.3.1 (it's currently 3.1.0). The version of LAPACK available by default on Travis CI is 3.3.1, so I don't expect this to cause trouble with the CI systems. Since 3.3.1 isn't quite as old as 3.1.0, I still need to mention the requirement in various places in the docs. Other than some extra documentation, this should all be working now though.

    There are a few advantages. One is that explicitly requiring more recent versions lets us avoid errors like https://github.com/scipy/scipy/issues/5039. Another is that this lets us provide a more complete Cython LAPACK API. The functions exported to Cython currently include only the routines common to every LAPACK version from 3.1.0 to 3.6.0. Increasing the minimum requirement lets us export another 169 routines through that interface. In particular, this adds:

    • cbbcsd
    • cgbequb
    • cgeequb
    • cgeqr2p
    • cgeqrfp
    • cheequb
    • cheswapr
    • chetri2
    • chetri2x
    • chetrs2
    • chfrk
    • chla_transtype
    • clanhf
    • clapmr
    • clarfgp
    • cpftrf
    • cpftri
    • cpftrs
    • cpoequb
    • cpstf2
    • cpstrf
    • csyconv
    • csyequb
    • csyswapr
    • csytri2
    • csytri2x
    • csytrs2
    • ctfsm
    • ctftri
    • ctfttp
    • ctfttr
    • ctpttf
    • ctpttr
    • ctrttf
    • ctrttp
    • cunbdb
    • cuncsd
    • dbbcsd
    • dgbequb
    • dgeequb
    • dgejsv
    • dgeqr2p
    • dgeqrfp
    • dgesvj
    • dgsvj0
    • dgsvj1
    • dlansf
    • dlapmr
    • dlarfgp
    • dlartgp
    • dlartgs
    • dlasq3
    • dlasq4
    • dlat2s
    • dorbdb
    • dorcsd
    • dpftrf
    • dpftri
    • dpftrs
    • dpoequb
    • dpstf2
    • dpstrf
    • dsfrk
    • dsposv
    • dsyconv
    • dsyequb
    • dsyswapr
    • dsytri2
    • dsytri2x
    • dsytrs2
    • dtfsm
    • dtftri
    • dtfttp
    • dtfttr
    • dtpttf
    • dtpttr
    • dtrttf
    • dtrttp
    • ilaclc
    • ilaclr
    • iladiag
    • iladlc
    • iladlr
    • ilaprec
    • ilaslc
    • ilaslr
    • ilatrans
    • ilauplo
    • ilazlc
    • ilazlr
    • sbbcsd
    • sgbequb
    • sgeequb
    • sgejsv
    • sgeqr2p
    • sgeqrfp
    • sgesvj
    • sgsvj0
    • sgsvj1
    • slansf
    • slapmr
    • slarfgp
    • slartgp
    • slartgs
    • slasq3
    • slasq4
    • sorbdb
    • sorcsd
    • spftrf
    • spftri
    • spftrs
    • spoequb
    • spstf2
    • spstrf
    • ssfrk
    • ssyconv
    • ssyequb
    • ssyswapr
    • ssytri2
    • ssytri2x
    • ssytrs2
    • stfsm
    • stftri
    • stfttp
    • stfttr
    • stpttf
    • stpttr
    • strttf
    • strttp
    • xerbla_array
    • zbbcsd
    • zcgesv
    • zcposv
    • zgbequb
    • zgeequb
    • zgeqr2p
    • zgeqrfp
    • zheequb
    • zheswapr
    • zhetri2
    • zhetri2x
    • zhetrs2
    • zhfrk
    • zlanhf
    • zlapmr
    • zlarfgp
    • zlat2c
    • zpftrf
    • zpftri
    • zpftrs
    • zpoequb
    • zpstf2
    • zpstrf
    • zsyconv
    • zsyequb
    • zsyswapr
    • zsytri2
    • zsytri2x
    • zsytrs2
    • ztfsm
    • ztftri
    • ztfttp
    • ztfttr
    • ztpttf
    • ztpttr
    • ztrttf
    • ztrttp
    • zunbdb
    • zuncsd
    scipy.linalg needs-work 
    opened by insertinterestingnamehere 130
  • ENH: add stats.qmc module with quasi Monte Carlo functionality

    ENH: add stats.qmc module with quasi Monte Carlo functionality

    Add scipy.stats.qmc.

    Reference issue

    Closes https://github.com/scipy/scipy/issues/9695

    What does this implement/fix?

    Provide a set of functions to create and assess quasi-Monte Carlo Design of Experiments.

    It provides a generic class scipy.stats.qmc.QMCEngine which defines a QMC engine/sampler. An engine is state aware: it can be continued, advanced and reseted. 4 base samplers are available:

    • scipy.stats.qmc.Sobol the well known Sobol' low discrepancy sequence. Several warnings have been added to guide the user into properly using this sampler. The sequence is scrambled by default.
    • scipy.stats.qmc.Halton: Halton low discrepancy sequence. The sequence is scrambled by default.
    • scipy.stats.qmc.LatinHypercube: plain LHS design.
    • scipy.stats.qmc.OrthogonalLatinHypercube: Orthogonal version of LHS which is more uniform than plain LHS.

    And 2 special samplers are available:

    • scipy.stats.qmc.MultinomialQMC: sampling from a multinomial distribution using any of the base scipy.stats.qmc.QMCEngine.
    • scipy.stats.qmc.MultivariateNormalQMC: sampling from a multivariate Normal using any of the base scipy.stats.qmc.QMCEngine.

    The module also provide the following helpers:

    • scipy.stats.qmc.discrepancy: assess the quality of a set of points in terms of space coverage.
    • scipy.stats.qmc.update_discrepancy: can be used in an optimization loop to construct a good set of points.
    • scipy.stats.qmc.scale: easily scale a set of points from (to) the unit interval to (from) a given range.

    The module quality has been assessed by specialists from the domain (see the long discussion bellow for more details). Following are some convergence plots of Sobol' and Halton.

    • gist for Halton: https://gist.github.com/tupui/ee6e685219c06c429338569e7ee7ff2a
    • gist for Sobol': https://gist.github.com/tupui/fb6e219b1dd2316b7498ebce231bfff5

    halton_art2 sobol_typeB

    scipy.stats enhancement 
    opened by tupui 129
  • Fixes safe handling of small singular values in svds.

    Fixes safe handling of small singular values in svds.

    Reference issue

    Allows to close https://github.com/scipy/scipy/issues/12629 Partially closes https://github.com/scipy/scipy/issues/11406

    What does this implement/fix?

    The way to compute a few singular values and vectors of a matrix A used by svds is to compute eigenvectors of either A' A or A A', whichever is smaller in size.

    Assuming some eigenvalues λi and corresponding eigenvectors vi of A' A are computed, the original implementation of svds computed singular values and vectors as follows. Observing that the computed eigenvectors vi are the right singular vectors of A, and the square roots of corresponding eigenvalues λi are corresponding singular values σi, the corresponding left singular values ui were computed by dividing A vi by σi so that ui and vi satisfy A vi = σi ui and A' ui = σi-1 A' A vi = σi vi.

    This way was clearly unsafe: computed λi can be negative because of the round-off errors, σi can be zero if A is not full rank, and if computed σi are very small then ui may lose orthogonality. In an attempt to fix this, at some point the current approach was implemented whereby eigenvalues λi below certain cut-off value were replaced by zeros, and corresponding left singular vectors by random vectors orthogonal to computed singular vectors. Such an approach does make sense if one employs svds for computing a low rank approximation of A. Assuming that the singular values are in descending order, the norm of the difference between A and the sum of σi ui v'i, i = 1, ..., k is equal to σk + 1. Therefore, if σk + 1 falls below the required accuracy of approximation, σi, i = k + 1, ... can be zeroed and the respective singular vectors no longer play any role. However, in this kind of svds application, it is the user who is to decide how small σk + 1 should be for this and further singular values and vectors to become of no importance, and this is what issue #12629 advocates.

    But the real disaster may happen if the user is after few smallest singular values or needs to find the nullspace of A (the subspace of vectors v with zero A v), as has been discovered by #11406. The algorithm employed by svds for computing singular vectors corresponding to singular values below the cut-off requires the availability of all singular vectors corresponding to singular values above cut-off. The reason for the failure reported by #11406 is that in the case of small singular values computation, only a few such singular vectors are available, and computing the rest of them would essentially require full SVD.

    This PR suggests an alternative fix for small singular values problem adopted by some other software implementing truncated SVD and PCA (e.g. scikit-learn and raleigh).

    Assuming A 'tall' (the number of rows not less than the number of columns) and having computed V = [v1, ... , vk] , svds should compute SVD for A V:

    A V = U Σ Q',

    where U is the matrix whose columns are singular vectors of A V, square matrix Σ is diagonal with corresponding singular values of A V on the diagonal and Q is the matrix whose columns are the corresponding right singular vectors of A V. After which V is updated as V := V Q, and we end up with

    A V = U Σ

    and hence V' A' A V = Σ U' U Σ = Σ2 = Λ, i.e. the columns of V are eigenvectors of A' A.

    Note that the singular values are guaranteed to be non-negative, singular vectors are orthonormal to machine accuracy, and zero (or very small) singular values are no longer a problem at all.

    The suggested fix eliminates the need for eigenvalues thresholding requested by https://github.com/scipy/scipy/issues/12629, allowing to close this issue.

    It also fixes the problem discovered by https://github.com/scipy/scipy/issues/11406 for matrices with the number of rows not less than the number of columns.

    Additional information

    Regarding the extra cost of the suggested post-processing step, one needs to bear in mind that both arpack and lobpcg solvers employed by svds for computing eigenvectors of A' A or A A' involve the Rayleigh-Ritz procedure in subspaces of dimension not less than 2k, which takes O(k3) flops. Therefore, using these solvers only makes sense for k << min(n, m), where (n, m) = A.shape.

    Assuming n > m >> k, the SVD of the n-by-k matrix A V would involve two steps: QR factorization of this matrix, and full SVD of the k-by-k factor R. The first step takes less than (n + 1)k(k + 1) multiplications, which is much less than 2 n m k needed for applying A' A to k vector iterates, and negligible extra memory. The second step takes O(k3) flops, which is still less, and 5 k2 extra memory at worst (if divide-and-conquer algorithm is used).

    Thus, the cost of the suggested post-processing step is going to be a small fraction of the overall computational costs.

    scipy.sparse.linalg maintenance 
    opened by evgueni-ovtchinnikov 114
  • ENH: integer rotations for spatial.transform.Rotation

    ENH: integer rotations for spatial.transform.Rotation

    Is your feature request related to a problem? Please describe.

    I'm using the Rotation class to combine 90° rotations and use the result of apply as an index in another array. Therefore, all I need is integers. I also use as_matrix to build affine transforms from the rotations. It's a bit cumbersome to have to call .round().astype(int) everywhere.

    Describe the solution you'd like.

    I'm not sure what would be the best way to do this since an integer rotation matrix doesn't necessrily correspond to integer quaternions or rotation vector. In turn, this also raises the question of the precision: If a flaot32 rotation matrix is accurate enough for someone, maybe a float32 quaternion is not. But I haven't given it much thoughts.

    I might propose to add a dtype argument to all the constructors and make the methods behave as if the rotations were stored as a rotation matrix with that dtype. Basically, only as_matrix, apply and inv would be affected by this argument.

    But for a class that's supposed to abstract away the internal representation of the rotations, it's a bit surprising to make the matrix representation special.

    Describe alternatives you've considered.

    Calling .round().astype(int) each time I use as_matrix or apply.

    Additional context (e.g. screenshots, GIFs)

    Related to issue #15283 about keeping the same dtype across representations. Which I don't think is a good idea if integers get involved. However, keeping the same dtype for the same representation should be a given.

    enhancement scipy.spatial 
    opened by Celelibi 1
  • BUG: test_maxiter_worsening[lgmres] failed on riscv

    BUG: test_maxiter_worsening[lgmres] failed on riscv

    Describe your issue.

    This test case fails on riscv64:

    FAILED sparse/linalg/_isolve/tests/test_iterative.py::test_maxiter_worsening[lgmres] - AssertionError
    

    This error looks similar to https://github.com/scipy/scipy/pull/13022 and https://github.com/scipy/scipy/commit/4383318f9a3a16e4e697a9920269a6947632b601. These errors are skipped on aarch64 and ppc64le, what about riscv64?

    full build log: https://bugs.gentoo.org/attachment.cgi?id=847590

    Reproducing Code Example

    No code example, just test case.
    

    Error message

    ==================================================================================================== FAILURES =====================================================================================================_________________________________________________________________________________________ test_maxiter_worsening[lgmres] __________________________________________________________________________________________[gw1] linux -- Python 3.10.9 /var/tmp/portage/dev-python/scipy-1.10.0/work/scipy-1.10.0-python3_10/install/usr/bin/python3.10
    
    solver = <function lgmres at 0x3fae312950>
    
        @pytest.mark.parametrize("solver", [
            pytest.param(gmres, marks=pytest.mark.xfail(platform.machine() == 'aarch64'
                                                        and sys.version_info[1] == 9,
                                                        reason="gh-13019")),
            qmr,
            pytest.param(lgmres, marks=pytest.mark.xfail(platform.machine() == 'ppc64le',
                                                         reason="fails on ppc64le")),
            pytest.param(cgs, marks=pytest.mark.xfail),
            pytest.param(bicg, marks=pytest.mark.xfail),
            pytest.param(bicgstab, marks=pytest.mark.xfail),
            pytest.param(gcrotmk, marks=pytest.mark.xfail),
            pytest.param(tfqmr, marks=pytest.mark.xfail)])
        def test_maxiter_worsening(solver):
            # Check error does not grow (boundlessly) with increasing maxiter.
            # This can occur due to the solvers hitting close to breakdown,
            # which they should detect and halt as necessary.
            # cf. gh-9100
    
            # Singular matrix, rhs numerically not in range
            A = np.array([[-0.1112795288033378, 0, 0, 0.16127952880333685],
                          [0, -0.13627952880333782+6.283185307179586j, 0, 0],
                          [0, 0, -0.13627952880333782-6.283185307179586j, 0],
                          [0.1112795288033368, 0j, 0j, -0.16127952880333785]])
            v = np.ones(4)
            best_error = np.inf
            tol = 7 if platform.machine() == 'aarch64' else 5
    
            for maxiter in range(1, 20):
                x, info = solver(A, v, maxiter=maxiter, tol=1e-8, atol=0)
    
                if info == 0:
                    assert_(np.linalg.norm(A.dot(x) - v) <= 1e-8*np.linalg.norm(v))
    
                error = np.linalg.norm(A.dot(x) - v)
                best_error = min(best_error, error)
    
                # Check with slack
    >           assert_(error <= tol*best_error)
    E           AssertionError
    A          = array([[-0.11127953+0.j        ,  0.        +0.j        ,
             0.        +0.j        ,  0.16127953+0.j        ],
           [ 0.        +0.j        , -0.13627953+6.28318531j,
             0.        +0.j        ,  0.        +0.j        ],
           [ 0.        +0.j        ,  0.        +0.j        ,
            -0.13627953-6.28318531j,  0.        +0.j        ],
           [ 0.11127953+0.j        ,  0.        +0.j        ,
             0.        +0.j        , -0.16127953+0.j        ]])
    best_error = 1.414213562373095
    error      = 67.94531422934396
    info       = 8
    maxiter    = 8
    solver     = <function lgmres at 0x3fae312950>
    tol        = 5
    v          = array([1., 1., 1., 1.])
    x          = array([-1.17813344e+15+0.j        , -6.61429022e+00-3.99819143j,
           -6.61429022e+00+3.99819143j, -8.12887631e+14+0.j        ])
    
    ../work/scipy-1.10.0-python3_10/install/usr/lib/python3.10/site-packages/scipy/sparse/linalg/_isolve/tests/test_iterative.py:487: AssertionError
    

    SciPy/NumPy/Python version information

    1.10.0 1.23.5 sys.version_info(major=3, minor=10, micro=9, releaselevel='final', serial=0)

    defect scipy.sparse.linalg 
    opened by peeweep 0
  • ENH: override _entropy for beta, chi and chi2 distributions

    ENH: override _entropy for beta, chi and chi2 distributions

    Reference issue

    Could not find directly related issues.

    What does this implement/fix?

    Implements analytic formulas using special functions for the entropy method of: stats.beta (Wikipedia formula) stats.chi (Wikipedia formula) stats.chi2 (Wikipedia formula)

    Additional information

    entropy falls back to quadrature integration if _entropy() is not overriden. The analytic formulas provide:

    • speedup for beta
    • precision and speedup improvements for chi and chi2

    Chi_entropy

    import matplotlib.pyplot as plt
    from scipy import special as sc
    import numpy as np
    from scipy.stats import chi
    
    def chi_entropy_analytic(df):
        return sc.gammaln(.5 * df) + \
                .5 * (df - np.log(2) - (df - 1) * sc.psi(.5 * df))
    
    degrees = np.linspace(1, 1000, 500)
    
    plt.plot(degrees, chi_entropy_analytic(degrees), label="analytic")
    plt.plot(degrees, chi(degrees).entropy(), label="quadrature")
    plt.legend()
    plt.title("Chi distribution entropy")
    plt.xlabel("df")
    plt.show()
    

    Chi_sq_entropy

    import matplotlib.pyplot as plt
    from scipy import special as sc
    import numpy as np
    from scipy.stats import chi2
    
    def chisq_entropy(df):
        half_df = 0.5 * df
        return half_df + np.log(2) + sc.gammaln(half_df) + \
            (1 - half_df) * sc.psi(half_df)
    
    degrees = np.linspace(1, 1000, 500)
    
    plt.plot(degrees, chisq_entropy(degrees), label="analytic")
    plt.plot(degrees, chi2(degrees).entropy(), label="quadrature")
    plt.legend()
    plt.title("Chi square distribution entropy")
    plt.xlabel("df")
    plt.show()
    
    scipy.stats enhancement 
    opened by dschmitz89 0
  • DOC: stats: Unexpected warning from Sphinx from a reference in a 'See Also' section

    DOC: stats: Unexpected warning from Sphinx from a reference in a 'See Also' section

    In the pull request https://github.com/scipy/scipy/pull/17702 (committed as https://github.com/scipy/scipy/commit/98085bbee274a8ead907b456755f131627457bdd), Sphinx generated a warning when the name gzscore was added to the "See Also" section of the zscore docstring. To avoid the warning, the work-around was to use the fully qualified name scipy.stats.gzscore. This should not be necessary.

    As I noted in gh-17702, I was able to reproduce the warning locally, but didn't find the cause.

    scipy.stats Documentation 
    opened by WarrenWeckesser 0
  • BUG: SciPy requires OpenBLAS even when building against a different library

    BUG: SciPy requires OpenBLAS even when building against a different library

    Describe your issue.

    I tried to build SciPy against Arm Performance Libraries (ArmPL); however, the build fails because of missing OpenBLAS.

    For context, I was able to build NumPy against ArmPL using the same site.cfg.

    Reproducing Code Example

    I used the following `site.cfg` file:
    
    # ArmPL
    # -----
    [openblas]
    libraries = armpl_lp64
    library_dirs = /mnt/data/opt/lib
    include_dirs = /mnt/data/opt/include
    runtime_library_dirs = /mnt/data/opt/lib
    

    Build with pip install .

    
    
    ### Error message
    
    ```shell
    Processing /mnt/data/andreac/scipy-1.9.3
      Installing build dependencies ... done
      Getting requirements to build wheel ... done
      Installing backend dependencies ... done
      Preparing metadata (pyproject.toml) ... error
      error: subprocess-exited-with-error
      
      × Preparing metadata (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [48 lines of output]
          The Meson build system
          Version: 1.0.0
          Source dir: /mnt/data/andreac/scipy-1.9.3
          Build dir: /mnt/data/andreac/scipy-1.9.3/.mesonpy-_dtofmia/build
          Build type: native build
          Project name: SciPy
          Project version: 1.9.3
          C compiler for the host machine: cc (gcc 7.5.0 "cc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0")
          C linker for the host machine: cc ld.bfd 2.30
          C++ compiler for the host machine: c++ (gcc 7.5.0 "c++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0")
          C++ linker for the host machine: c++ ld.bfd 2.30
          Host machine cpu family: aarch64
          Host machine cpu: aarch64
          Compiler for C supports arguments -Wno-unused-but-set-variable: YES
          Compiler for C supports arguments -Wno-unused-but-set-variable: YES (cached)
          Compiler for C supports arguments -Wno-unused-function: YES
          Compiler for C supports arguments -Wno-conversion: YES
          Compiler for C supports arguments -Wno-misleading-indentation: YES
          Compiler for C supports arguments -Wno-incompatible-pointer-types: YES
          Library m found: YES
          Fortran compiler for the host machine: gfortran (gcc 7.5.0 "GNU Fortran (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0")
          Fortran linker for the host machine: gfortran ld.bfd 2.30
          Compiler for Fortran supports arguments -Wno-conversion: YES
          Program cython found: YES (/tmp/pip-build-env-34ij7s89/overlay/bin/cython)
          Program pythran found: YES (/tmp/pip-build-env-34ij7s89/overlay/bin/pythran)
          Program cp found: YES (/bin/cp)
          Program python found: YES (/mnt/data/opt/bin/python3.9)
          Found pkg-config: /usr/bin/pkg-config (0.29.1)
          Run-time dependency threads found: YES
          Library npymath found: YES
          Library npyrandom found: YES
          Found CMake: /usr/bin/cmake (3.10.2)
          DEPRECATION: CMake support for versions <3.17 is deprecated since Meson 0.62.0.
          |
          |   However, Meson was only able to find CMake 3.10.2.
          |
          |   Support for all CMake versions below 3.17.0 will be removed once
          |   newer CMake versions are more widely adopted. If you encounter
          |   any errors please try upgrading CMake to a newer version first.
          
          WARNING: CMake Toolchain: Failed to determine CMake compilers state
          Run-time dependency openblas found: NO (tried pkgconfig and cmake)
          Run-time dependency openblas found: NO (tried pkgconfig and cmake)
          
          ../../scipy/meson.build:131:0: ERROR: Dependency "OpenBLAS" not found, tried pkgconfig and cmake
          
          A full log can be found at /mnt/data/andreac/scipy-1.9.3/.mesonpy-_dtofmia/build/meson-logs/meson-log.txt
          + meson setup --prefix=/mnt/data/opt /mnt/data/andreac/scipy-1.9.3 /mnt/data/andreac/scipy-1.9.3/.mesonpy-_dtofmia/build --native-file=/mnt/data/andreac/scipy-1.9.3/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: metadata-generation-failed
    
    × Encountered error while generating package metadata.
    ╰─> See above for output.
    
    note: This is an issue with the package mentioned above, not pip.
    hint: See above for details.
    

    SciPy/NumPy/Python version information

    ------
    os.name='posix'
    ------
    sys.platform='linux'
    ------
    sys.version:
    3.9.15 (main, Jan  5 2023, 05:16:31) 
    [GCC 7.5.0]
    ------
    sys.prefix:
    /mnt/data/opt
    ------
    sys.path=':/mnt/data/opt/lib/python39.zip:/mnt/data/opt/lib/python3.9:/mnt/data/opt/lib/python3.9/lib-dynload:/mnt/data/opt/lib/python3.9/site-packages'
    ------
    Found new numpy version '1.24.1' in /mnt/data/opt/lib/python3.9/site-packages/numpy/__init__.py
    Found f2py2e version '1.24.1' in /mnt/data/opt/lib/python3.9/site-packages/numpy/f2py/f2py2e.py
    error: module 'numpy.distutils' has no attribute '__version__'
    ------
    Importing numpy.distutils.fcompiler ... ok
    ------
    Checking availability of supported Fortran compilers:
    Gnu95FCompiler instance properties:
      archiver        = ['/usr/bin/gfortran', '-cr']
      compile_switch  = '-c'
      compiler_f77    = ['/usr/bin/gfortran', '-Wall', '-g', '-ffixed-form', '-
                        fno-second-underscore', '-fPIC', '-O3', '-funroll-loops']
      compiler_f90    = ['/usr/bin/gfortran', '-Wall', '-g', '-fno-second-
                        underscore', '-fPIC', '-O3', '-funroll-loops']
      compiler_fix    = ['/usr/bin/gfortran', '-Wall', '-g', '-ffixed-form', '-
                        fno-second-underscore', '-Wall', '-g', '-fno-second-
                        underscore', '-fPIC', '-O3', '-funroll-loops']
      libraries       = ['gfortran']
      library_dirs    = ['/usr/lib/gcc/aarch64-linux-gnu/7',
                        '/usr/lib/gcc/aarch64-linux-gnu/7']
      linker_exe      = ['/usr/bin/gfortran', '-Wall', '-Wall']
      linker_so       = ['/usr/bin/gfortran', '-Wall', '-g', '-Wall', '-g', '-
                        shared']
      object_switch   = '-o '
      ranlib          = ['/usr/bin/gfortran']
      version         = LooseVersion ('7')
      version_cmd     = ['/usr/bin/gfortran', '-dumpversion']
    Fortran compilers found:
      --fcompiler=gnu95  GNU Fortran 95 compiler (7)
    Compilers available for this platform, but not found:
      --fcompiler=absoft   Absoft Corp Fortran Compiler
      --fcompiler=arm      Arm Compiler
      --fcompiler=compaq   Compaq Fortran Compiler
      --fcompiler=fujitsu  Fujitsu Fortran Compiler
      --fcompiler=g95      G95 Fortran Compiler
      --fcompiler=gnu      GNU Fortran 77 compiler
      --fcompiler=intel    Intel Fortran Compiler for 32-bit apps
      --fcompiler=intele   Intel Fortran Compiler for Itanium apps
      --fcompiler=intelem  Intel Fortran Compiler for 64-bit apps
      --fcompiler=lahey    Lahey/Fujitsu Fortran 95 Compiler
      --fcompiler=nag      NAGWare Fortran 95 Compiler
      --fcompiler=nagfor   NAG Fortran Compiler
      --fcompiler=nv       NVIDIA HPC SDK
      --fcompiler=pathf95  PathScale Fortran Compiler
      --fcompiler=pg       Portland Group Fortran Compiler
      --fcompiler=vast     Pacific-Sierra Research Fortran 90 Compiler
    Compilers not available on this platform:
      --fcompiler=flang     Portland Group Fortran LLVM Compiler
      --fcompiler=hpux      HP Fortran 90 Compiler
      --fcompiler=ibm       IBM XL Fortran Compiler
      --fcompiler=intelev   Intel Visual Fortran Compiler for Itanium apps
      --fcompiler=intelv    Intel Visual Fortran Compiler for 32-bit apps
      --fcompiler=intelvem  Intel Visual Fortran Compiler for 64-bit apps
      --fcompiler=mips      MIPSpro Fortran Compiler
      --fcompiler=none      Fake Fortran compiler
      --fcompiler=sun       Sun or Forte Fortran 95 Compiler
    For compiler details, run 'config_fc --verbose' setup command.
    ------
    Importing numpy.distutils.cpuinfo ... ok
    ------
    CPU information: CPUInfoBase__get_nbits getNCPUs is_64bit ------
    
    Build issues 
    opened by AndreaCogliati 9
Releases(v1.10.0)
  • v1.10.0(Jan 3, 2023)

    SciPy 1.10.0 Release Notes

    SciPy 1.10.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.10.x branch, and on adding new features on the main branch.

    This release requires Python 3.8+ and NumPy 1.19.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new dedicated datasets submodule (scipy.datasets) has been added, and is now preferred over usage of scipy.misc for dataset retrieval.
    • A new scipy.interpolate.make_smoothing_spline function was added. This function constructs a smoothing cubic spline from noisy data, using the generalized cross-validation (GCV) criterion to find the tradeoff between smoothness and proximity to data points.
    • scipy.stats has three new distributions, two new hypothesis tests, three new sample statistics, a class for greater control over calculations involving covariance matrices, and many other enhancements.

    New features

    scipy.datasets introduction

    • A new dedicated datasets submodule has been added. The submodules is meant for datasets that are relevant to other SciPy submodules ands content (tutorials, examples, tests), as well as contain a curated set of datasets that are of wider interest. As of this release, all the datasets from scipy.misc have been added to scipy.datasets (and deprecated in scipy.misc).

    • The submodule is based on Pooch (a new optional dependency for SciPy), a Python package to simplify fetching data files. This move will, in a subsequent release, facilitate SciPy to trim down the sdist/wheel sizes, by decoupling the data files and moving them out of the SciPy repository, hosting them externally and downloading them when requested. After downloading the datasets once, the files are cached to avoid network dependence and repeated usage.

    • Added datasets from scipy.misc: scipy.datasets.face, scipy.datasets.ascent, scipy.datasets.electrocardiogram

    • Added download and caching functionality:

      • scipy.datasets.download_all: a function to download all the scipy.datasets associated files at once.
      • scipy.datasets.clear_cache: a simple utility function to clear cached dataset files from the file system.
      • scipy/datasets/_download_all.py can be run as a standalone script for packaging purposes to avoid any external dependency at build or test time. This can be used by SciPy packagers (e.g., for Linux distros) which may have to adhere to rules that forbid downloading sources from external repositories at package build time.

    scipy.integrate improvements

    • Added parameter complex_func to scipy.integrate.quad, which can be set True to integrate a complex integrand.

    scipy.interpolate improvements

    • scipy.interpolate.interpn now supports tensor-product interpolation methods (slinear, cubic, quintic and pchip)
    • Tensor-product interpolation methods (slinear, cubic, quintic and pchip) in scipy.interpolate.interpn and scipy.interpolate.RegularGridInterpolator now allow values with trailing dimensions.
    • scipy.interpolate.RegularGridInterpolator has a new fast path for method="linear" with 2D data, and RegularGridInterpolator is now easier to subclass
    • scipy.interpolate.interp1d now can take a single value for non-spline methods.
    • A new extrapolate argument is available to scipy.interpolate.BSpline.design_matrix, allowing extrapolation based on the first and last intervals.
    • A new function scipy.interpolate.make_smoothing_spline has been added. It is an implementation of the generalized cross-validation spline smoothing algorithm. The lam=None (default) mode of this function is a clean-room reimplementation of the classic gcvspl.f Fortran algorithm for constructing GCV splines.
    • A new method="pchip" mode was aded to scipy.interpolate.RegularGridInterpolator. This mode constructs an interpolator using tensor products of C1-continuous monotone splines (essentially, a scipy.interpolate.PchipInterpolator instance per dimension).

    scipy.sparse.linalg improvements

    • The spectral 2-norm is now available in scipy.sparse.linalg.norm.

    • The performance of scipy.sparse.linalg.norm for the default case (Frobenius norm) has been improved.

    • LAPACK wrappers were added for trexc and trsen.

    • The scipy.sparse.linalg.lobpcg algorithm was rewritten, yielding the following improvements:

      • a simple tunable restart potentially increases the attainable accuracy for edge cases,
      • internal postprocessing runs one final exact Rayleigh-Ritz method giving more accurate and orthonormal eigenvectors,
      • output the computed iterate with the smallest max norm of the residual and drop the history of subsequent iterations,
      • remove the check for LinearOperator format input and thus allow a simple function handle of a callable object as an input,
      • better handling of common user errors with input data, rather than letting the algorithm fail.

    scipy.linalg improvements

    • scipy.linalg.lu_factor now accepts rectangular arrays instead of being restricted to square arrays.

    scipy.ndimage improvements

    • The new scipy.ndimage.value_indices function provides a time-efficient method to search for the locations of individual values with an array of image data.
    • A new radius argument is supported by scipy.ndimage.gaussian_filter1d and scipy.ndimage.gaussian_filter for adjusting the kernel size of the filter.

    scipy.optimize improvements

    • scipy.optimize.brute now coerces non-iterable/single-value args into a tuple.
    • scipy.optimize.least_squares and scipy.optimize.curve_fit now accept scipy.optimize.Bounds for bounds constraints.
    • Added a tutorial for scipy.optimize.milp.
    • Improved the pretty-printing of scipy.optimize.OptimizeResult objects.
    • Additional options (parallel, threads, mip_rel_gap) can now be passed to scipy.optimize.linprog with method='highs'.

    scipy.signal improvements

    • The new window function scipy.signal.windows.lanczos was added to compute a Lanczos window, also known as a sinc window.

    scipy.sparse.csgraph improvements

    • the performance of scipy.sparse.csgraph.dijkstra has been improved, and star graphs in particular see a marked performance improvement

    scipy.special improvements

    • The new function scipy.special.powm1, a ufunc with signature powm1(x, y), computes x**y - 1. The function avoids the loss of precision that can result when y is close to 0 or when x is close to 1.
    • scipy.special.erfinv is now more accurate as it leverages the Boost equivalent under the hood.

    scipy.stats improvements

    • Added scipy.stats.goodness_of_fit, a generalized goodness-of-fit test for use with any univariate distribution, any combination of known and unknown parameters, and several choices of test statistic (Kolmogorov-Smirnov, Cramer-von Mises, and Anderson-Darling).

    • Improved scipy.stats.bootstrap: Default method 'BCa' now supports multi-sample statistics. Also, the bootstrap distribution is returned in the result object, and the result object can be passed into the function as parameter bootstrap_result to add additional resamples or change the confidence interval level and type.

    • Added maximum spacing estimation to scipy.stats.fit.

    • Added the Poisson means test ("E-test") as scipy.stats.poisson_means_test.

    • Added new sample statistics.

      • Added scipy.stats.contingency.odds_ratio to compute both the conditional and unconditional odds ratios and corresponding confidence intervals for 2x2 contingency tables.
      • Added scipy.stats.directional_stats to compute sample statistics of n-dimensional directional data.
      • Added scipy.stats.expectile, which generalizes the expected value in the same way as quantiles are a generalization of the median.
    • Added new statistical distributions.

      • Added scipy.stats.uniform_direction, a multivariate distribution to sample uniformly from the surface of a hypersphere.
      • Added scipy.stats.random_table, a multivariate distribution to sample uniformly from m x n contingency tables with provided marginals.
      • Added scipy.stats.truncpareto, the truncated Pareto distribution.
    • Improved the fit method of several distributions.

      • scipy.stats.skewnorm and scipy.stats.weibull_min now use an analytical solution when method='mm', which also serves a starting guess to improve the performance of method='mle'.
      • scipy.stats.gumbel_r and scipy.stats.gumbel_l: analytical maximum likelihood estimates have been extended to the cases in which location or scale are fixed by the user.
      • Analytical maximum likelihood estimates have been added for scipy.stats.powerlaw.
    • Improved random variate sampling of several distributions.

      • Drawing multiple samples from scipy.stats.matrix_normal, scipy.stats.ortho_group, scipy.stats.special_ortho_group, and scipy.stats.unitary_group is faster.
      • The rvs method of scipy.stats.vonmises now wraps to the interval [-np.pi, np.pi].
      • Improved the reliability of scipy.stats.loggamma rvs method for small values of the shape parameter.
    • Improved the speed and/or accuracy of functions of several statistical distributions.

      • Added scipy.stats.Covariance for better speed, accuracy, and user control in multivariate normal calculations.
      • scipy.stats.skewnorm methods cdf, sf, ppf, and isf methods now use the implementations from Boost, improving speed while maintaining accuracy. The calculation of higher-order moments is also faster and more accurate.
      • scipy.stats.invgauss methods ppf and isf methods now use the implementations from Boost, improving speed and accuracy.
      • scipy.stats.invweibull methods sf and isf are more accurate for small probability masses.
      • scipy.stats.nct and scipy.stats.ncx2 now rely on the implementations from Boost, improving speed and accuracy.
      • Implemented the logpdf method of scipy.stats.vonmises for reliability in extreme tails.
      • Implemented the isf method of scipy.stats.levy for speed and accuracy.
      • Improved the robustness of scipy.stats.studentized_range for large df by adding an infinite degree-of-freedom approximation.
      • Added a parameter lower_limit to scipy.stats.multivariate_normal, allowing the user to change the integration limit from -inf to a desired value.
      • Improved the robustness of entropy of scipy.stats.vonmises for large concentration values.
    • Enhanced scipy.stats.gaussian_kde.

      • Added scipy.stats.gaussian_kde.marginal, which returns the desired marginal distribution of the original kernel density estimate distribution.
      • The cdf method of scipy.stats.gaussian_kde now accepts a lower_limit parameter for integrating the PDF over a rectangular region.
      • Moved calculations for scipy.stats.gaussian_kde.logpdf to Cython, improving speed.
      • The global interpreter lock is released by the pdf method of scipy.stats.gaussian_kde for improved multithreading performance.
      • Replaced explicit matrix inversion with Cholesky decomposition for speed and accuracy.
    • Enhanced the result objects returned by many scipy.stats functions

      • Added a confidence_interval method to the result object returned by scipy.stats.ttest_1samp and scipy.stats.ttest_rel.
      • The scipy.stats functions combine_pvalues, fisher_exact, chi2_contingency, median_test and mood now return bunch objects rather than plain tuples, allowing attributes to be accessed by name.
      • Attributes of the result objects returned by multiscale_graphcorr, anderson_ksamp, binomtest, crosstab, pointbiserialr, spearmanr, kendalltau, and weightedtau have been renamed to statistic and pvalue for consistency throughout scipy.stats. Old attribute names are still allowed for backward compatibility.
      • scipy.stats.anderson now returns the parameters of the fitted distribution in a scipy.stats._result_classes.FitResult object.
      • The plot method of scipy.stats._result_classes.FitResult now accepts a plot_type parameter; the options are 'hist' (histogram, default), 'qq' (Q-Q plot), 'pp' (P-P plot), and 'cdf' (empirical CDF plot).
      • Kolmogorov-Smirnov tests (e.g. scipy.stats.kstest) now return the location (argmax) at which the statistic is calculated and the variant of the statistic used.
    • Improved the performance of several scipy.stats functions.

      • Improved the performance of scipy.stats.cramervonmises_2samp and scipy.stats.ks_2samp with method='exact'.
      • Improved the performance of scipy.stats.siegelslopes.
      • Improved the performance of scipy.stats.mstats.hdquantile_sd.
      • Improved the performance of scipy.stats.binned_statistic_dd for several NumPy statistics, and binned statistics methods now support complex data.
    • Added the scramble optional argument to scipy.stats.qmc.LatinHypercube. It replaces centered, which is now deprecated.

    • Added a parameter optimization to all scipy.stats.qmc.QMCEngine subclasses to improve characteristics of the quasi-random variates.

    • Added tie correction to scipy.stats.mood.

    • Added tutorials for resampling methods in scipy.stats.

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized, so passing the vectorized argument explicitly is no longer required to take advantage of vectorized statistics.

    • Improved the speed of scipy.stats.permutation_test for permutation types 'samples' and 'pairings'.

    • Added axis, nan_policy, and masked array support to scipy.stats.jarque_bera.

    • Added the nan_policy optional argument to scipy.stats.rankdata.

    Deprecated features

    • scipy.misc module and all the methods in misc are deprecated in v1.10 and will be completely removed in SciPy v2.0.0. Users are suggested to utilize the scipy.datasets module instead for the dataset methods.
    • scipy.stats.qmc.LatinHypercube parameter centered has been deprecated. It is replaced by the scramble argument for more consistency with other QMC engines.
    • scipy.interpolate.interp2d class has been deprecated. The docstring of the deprecated routine lists recommended replacements.

    Expired Deprecations

    • There is an ongoing effort to follow through on long-standing deprecations.

    • The following previously deprecated features are affected:

      • Removed cond & rcond kwargs in linalg.pinv
      • Removed wrappers scipy.linalg.blas.{clapack, flapack}
      • Removed scipy.stats.NumericalInverseHermite and removed tol & max_intervals kwargs from scipy.stats.sampling.NumericalInverseHermite
      • Removed local_search_options kwarg frrom scipy.optimize.dual_annealing.

    Other changes

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized by looking for an axis parameter in the signature of statistic. If an axis parameter is present in statistic but should not be relied on for vectorized calls, users must pass option vectorized==False explicitly.
    • scipy.stats.multivariate_normal will now raise a ValueError when the covariance matrix is not positive semidefinite, regardless of which method is called.

    Authors

    • Name (commits)
    • h-vetinari (10)
    • Jelle Aalbers (1)
    • Oriol Abril-Pla (1) +
    • Alan-Hung (1) +
    • Tania Allard (7)
    • Oren Amsalem (1) +
    • Sven Baars (10)
    • Balthasar (1) +
    • Ross Barnowski (1)
    • Christoph Baumgarten (2)
    • Peter Bell (2)
    • Sebastian Berg (1)
    • Aaron Berk (1) +
    • boatwrong (1) +
    • boeleman (1) +
    • Jake Bowhay (50)
    • Matthew Brett (4)
    • Evgeni Burovski (93)
    • Matthias Bussonnier (6)
    • Dominic C (2)
    • Mingbo Cai (1) +
    • James Campbell (2) +
    • CJ Carey (4)
    • cesaregarza (1) +
    • charlie0389 (1) +
    • Hood Chatham (5)
    • Andrew Chin (1) +
    • Daniel Ching (1) +
    • Leo Chow (1) +
    • chris (3) +
    • John Clow (1) +
    • cm7S (1) +
    • cmgodwin (1) +
    • Christopher Cowden (2) +
    • Henry Cuzco (2) +
    • Anirudh Dagar (12)
    • Hans Dembinski (2) +
    • Jaiden di Lanzo (24) +
    • Felipe Dias (1) +
    • Dieter Werthmüller (1)
    • Giuseppe Dilillo (1) +
    • dpoerio (1) +
    • drpeteb (1) +
    • Christopher Dupuis (1) +
    • Jordan Edmunds (1) +
    • Pieter Eendebak (1) +
    • Jérome Eertmans (1) +
    • Fabian Egli (2) +
    • Sebastian Ehlert (2) +
    • Kian Eliasi (1) +
    • Tomohiro Endo (1) +
    • Stefan Endres (1)
    • Zeb Engberg (4) +
    • Jonas Eschle (1) +
    • Thomas J. Fan (9)
    • fiveseven (1) +
    • Neil Flood (1) +
    • Franz Forstmayr (1)
    • Sara Fridovich-Keil (1)
    • David Gilbertson (1) +
    • Ralf Gommers (251)
    • Marco Gorelli (2) +
    • Matt Haberland (387)
    • Andrew Hawryluk (2) +
    • Christoph Hohnerlein (2) +
    • Loïc Houpert (2) +
    • Shamus Husheer (1) +
    • ideasrule (1) +
    • imoiwm (1) +
    • Lakshaya Inani (1) +
    • Joseph T. Iosue (1)
    • iwbc-mzk (1) +
    • Nathan Jacobi (3) +
    • Julien Jerphanion (5)
    • He Jia (1)
    • jmkuebler (1) +
    • Johannes Müller (1) +
    • Vedant Jolly (1) +
    • Juan Luis Cano Rodríguez (2)
    • Justin (1) +
    • jvavrek (1) +
    • jyuv (2)
    • Kai Mühlbauer (1) +
    • Nikita Karetnikov (3) +
    • Reinert Huseby Karlsen (1) +
    • kaspar (2) +
    • Toshiki Kataoka (1)
    • Robert Kern (3)
    • Joshua Klein (1) +
    • Andrew Knyazev (7)
    • Jozsef Kutas (16) +
    • Eric Larson (4)
    • Lechnio (1) +
    • Antony Lee (2)
    • Aditya Limaye (1) +
    • Xingyu Liu (2)
    • Christian Lorentzen (4)
    • Loïc Estève (2)
    • Thibaut Lunet (2) +
    • Peter Lysakovski (1)
    • marianasalamoni (2) +
    • mariprudencio (1) +
    • Paige Martin (1) +
    • Arno Marty (1) +
    • matthewborish (3) +
    • Damon McDougall (1)
    • Nicholas McKibben (22)
    • McLP (1) +
    • mdmahendri (1) +
    • Melissa Weber Mendonça (9)
    • Jarrod Millman (1)
    • Naoto Mizuno (2)
    • Shashaank N (1)
    • Pablo S Naharro (1) +
    • nboudrie (2) +
    • Andrew Nelson (52)
    • Nico Schlömer (1)
    • NiMlr (1) +
    • o-alexandre-felipe (1) +
    • Maureen Ononiwu (1) +
    • Dimitri Papadopoulos (2) +
    • partev (1) +
    • Tirth Patel (10)
    • Paulius Šarka (1) +
    • Josef Perktold (1)
    • Giacomo Petrillo (3) +
    • Matti Picus (1)
    • Rafael Pinto (1) +
    • PKNaveen (1) +
    • Ilhan Polat (6)
    • Akshita Prasanth (2) +
    • Sean Quinn (1)
    • Tyler Reddy (155)
    • Martin Reinecke (1)
    • Ned Richards (1)
    • Marie Roald (1) +
    • Sam Rosen (4) +
    • Pamphile Roy (105)
    • sabonerune (2) +
    • Atsushi Sakai (94)
    • Daniel Schmitz (27)
    • Anna Scholtz (1) +
    • Eli Schwartz (11)
    • serge-sans-paille (2)
    • JEEVANSHI SHARMA (1) +
    • ehsan shirvanian (2) +
    • siddhantwahal (2)
    • Mathieu Dutour Sikiric (1) +
    • Sourav Singh (1)
    • Alexander Soare (1) +
    • Bjørge Solli (2) +
    • Scott Staniewicz (1)
    • Ethan Steinberg (3) +
    • Albert Steppi (3)
    • Thomas Stoeger (1) +
    • Kai Striega (4)
    • Tartopohm (1) +
    • Mamoru TASAKA (2) +
    • Ewout ter Hoeven (5)
    • TianyiQ (1) +
    • Tiger (1) +
    • Will Tirone (1)
    • Ajay Shanker Tripathi (1) +
    • Edgar Andrés Margffoy Tuay (1) +
    • Dmitry Ulyumdzhiev (1) +
    • Hari Vamsi (1) +
    • VitalyChait (1) +
    • Rik Voorhaar (1) +
    • Samuel Wallan (4)
    • Stefan van der Walt (2)
    • Warren Weckesser (145)
    • wei2222 (1) +
    • windows-server-2003 (3) +
    • Marek Wojciechowski (2) +
    • Niels Wouda (1) +
    • WRKampi (1) +
    • Yeonjoo Yoo (1) +
    • Rory Yorke (1)
    • Xiao Yuan (2) +
    • Meekail Zain (2) +
    • Fabio Zanini (1) +
    • Steffen Zeile (1) +
    • Egor Zemlyanoy (19)
    • Gavin Zhang (3) +

    A total of 184 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(343.67 KB)
    README.txt(97.07 KB)
    scipy-1.10.0-cp310-cp310-macosx_10_15_x86_64.whl(33.46 MB)
    scipy-1.10.0-cp310-cp310-macosx_12_0_arm64.whl(27.43 MB)
    scipy-1.10.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.45 MB)
    scipy-1.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.82 MB)
    scipy-1.10.0-cp310-cp310-win_amd64.whl(40.51 MB)
    scipy-1.10.0-cp311-cp311-macosx_10_15_x86_64.whl(33.36 MB)
    scipy-1.10.0-cp311-cp311-macosx_12_0_arm64.whl(27.37 MB)
    scipy-1.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.25 MB)
    scipy-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.54 MB)
    scipy-1.10.0-cp311-cp311-win_amd64.whl(40.27 MB)
    scipy-1.10.0-cp38-cp38-macosx_10_15_x86_64.whl(33.41 MB)
    scipy-1.10.0-cp38-cp38-macosx_12_0_arm64.whl(27.45 MB)
    scipy-1.10.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.58 MB)
    scipy-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.93 MB)
    scipy-1.10.0-cp38-cp38-win_amd64.whl(40.24 MB)
    scipy-1.10.0-cp39-cp39-macosx_10_15_x86_64.whl(33.52 MB)
    scipy-1.10.0-cp39-cp39-macosx_12_0_arm64.whl(27.55 MB)
    scipy-1.10.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.51 MB)
    scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.85 MB)
    scipy-1.10.0-cp39-cp39-win_amd64.whl(40.53 MB)
    scipy-1.10.0.tar.gz(40.43 MB)
  • v1.10.0rc2(Dec 25, 2022)

    SciPy 1.10.0 Release Notes

    Note: SciPy 1.10.0 is not released yet!

    SciPy 1.10.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.10.x branch, and on adding new features on the main branch.

    This release requires Python 3.8+ and NumPy 1.19.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new dedicated datasets submodule (scipy.datasets) has been added, and is now preferred over usage of scipy.misc for dataset retrieval.
    • A new scipy.interpolate.make_smoothing_spline function was added. This function constructs a smoothing cubic spline from noisy data, using the generalized cross-validation (GCV) criterion to find the tradeoff between smoothness and proximity to data points.
    • scipy.stats has three new distributions, two new hypothesis tests, three new sample statistics, a class for greater control over calculations involving covariance matrices, and many other enhancements.

    New features

    scipy.datasets introduction

    • A new dedicated datasets submodule has been added. The submodules is meant for datasets that are relevant to other SciPy submodules ands content (tutorials, examples, tests), as well as contain a curated set of datasets that are of wider interest. As of this release, all the datasets from scipy.misc have been added to scipy.datasets (and deprecated in scipy.misc).

    • The submodule is based on Pooch (a new optional dependency for SciPy), a Python package to simplify fetching data files. This move will, in a subsequent release, facilitate SciPy to trim down the sdist/wheel sizes, by decoupling the data files and moving them out of the SciPy repository, hosting them externally and downloading them when requested. After downloading the datasets once, the files are cached to avoid network dependence and repeated usage.

    • Added datasets from scipy.misc: scipy.datasets.face, scipy.datasets.ascent, scipy.datasets.electrocardiogram

    • Added download and caching functionality:

      • scipy.datasets.download_all: a function to download all the scipy.datasets associated files at once.
      • scipy.datasets.clear_cache: a simple utility function to clear cached dataset files from the file system.
      • scipy/datasets/_download_all.py can be run as a standalone script for packaging purposes to avoid any external dependency at build or test time. This can be used by SciPy packagers (e.g., for Linux distros) which may have to adhere to rules that forbid downloading sources from external repositories at package build time.

    scipy.integrate improvements

    • Added scipy.integrate.qmc_quad, which performs quadrature using Quasi-Monte Carlo points.
    • Added parameter complex_func to scipy.integrate.quad, which can be set True to integrate a complex integrand.

    scipy.interpolate improvements

    • scipy.interpolate.interpn now supports tensor-product interpolation methods (slinear, cubic, quintic and pchip)
    • Tensor-product interpolation methods (slinear, cubic, quintic and pchip) in scipy.interpolate.interpn and scipy.interpolate.RegularGridInterpolator now allow values with trailing dimensions.
    • scipy.interpolate.RegularGridInterpolator has a new fast path for method="linear" with 2D data, and RegularGridInterpolator is now easier to subclass
    • scipy.interpolate.interp1d now can take a single value for non-spline methods.
    • A new extrapolate argument is available to scipy.interpolate.BSpline.design_matrix, allowing extrapolation based on the first and last intervals.
    • A new function scipy.interpolate.make_smoothing_spline has been added. It is an implementation of the generalized cross-validation spline smoothing algorithm. The lam=None (default) mode of this function is a clean-room reimplementation of the classic gcvspl.f Fortran algorithm for constructing GCV splines.
    • A new method="pchip" mode was aded to scipy.interpolate.RegularGridInterpolator. This mode constructs an interpolator using tensor products of C1-continuous monotone splines (essentially, a scipy.interpolate.PchipInterpolator instance per dimension).

    scipy.sparse.linalg improvements

    • The spectral 2-norm is now available in scipy.sparse.linalg.norm.

    • The performance of scipy.sparse.linalg.norm for the default case (Frobenius norm) has been improved.

    • LAPACK wrappers were added for trexc and trsen.

    • The scipy.sparse.linalg.lobpcg algorithm was rewritten, yielding the following improvements:

      • a simple tunable restart potentially increases the attainable accuracy for edge cases,
      • internal postprocessing runs one final exact Rayleigh-Ritz method giving more accurate and orthonormal eigenvectors,
      • output the computed iterate with the smallest max norm of the residual and drop the history of subsequent iterations,
      • remove the check for LinearOperator format input and thus allow a simple function handle of a callable object as an input,
      • better handling of common user errors with input data, rather than letting the algorithm fail.

    scipy.linalg improvements

    • scipy.linalg.lu_factor now accepts rectangular arrays instead of being restricted to square arrays.

    scipy.ndimage improvements

    • The new scipy.ndimage.value_indices function provides a time-efficient method to search for the locations of individual values with an array of image data.
    • A new radius argument is supported by scipy.ndimage.gaussian_filter1d and scipy.ndimage.gaussian_filter for adjusting the kernel size of the filter.

    scipy.optimize improvements

    • scipy.optimize.brute now coerces non-iterable/single-value args into a tuple.
    • scipy.optimize.least_squares and scipy.optimize.curve_fit now accept scipy.optimize.Bounds for bounds constraints.
    • Added a tutorial for scipy.optimize.milp.
    • Improved the pretty-printing of scipy.optimize.OptimizeResult objects.
    • Additional options (parallel, threads, mip_rel_gap) can now be passed to scipy.optimize.linprog with method='highs'.

    scipy.signal improvements

    • The new window function scipy.signal.windows.lanczos was added to compute a Lanczos window, also known as a sinc window.

    scipy.sparse.csgraph improvements

    • the performance of scipy.sparse.csgraph.dijkstra has been improved, and star graphs in particular see a marked performance improvement

    scipy.special improvements

    • The new function scipy.special.powm1, a ufunc with signature powm1(x, y), computes x**y - 1. The function avoids the loss of precision that can result when y is close to 0 or when x is close to 1.
    • scipy.special.erfinv is now more accurate as it leverages the Boost equivalent under the hood.

    scipy.stats improvements

    • Added scipy.stats.goodness_of_fit, a generalized goodness-of-fit test for use with any univariate distribution, any combination of known and unknown parameters, and several choices of test statistic (Kolmogorov-Smirnov, Cramer-von Mises, and Anderson-Darling).

    • Improved scipy.stats.bootstrap: Default method 'BCa' now supports multi-sample statistics. Also, the bootstrap distribution is returned in the result object, and the result object can be passed into the function as parameter bootstrap_result to add additional resamples or change the confidence interval level and type.

    • Added maximum spacing estimation to scipy.stats.fit.

    • Added the Poisson means test ("E-test") as scipy.stats.poisson_means_test.

    • Added new sample statistics.

      • Added scipy.stats.contingency.odds_ratio to compute both the conditional and unconditional odds ratios and corresponding confidence intervals for 2x2 contingency tables.
      • Added scipy.stats.directional_stats to compute sample statistics of n-dimensional directional data.
      • Added scipy.stats.expectile, which generalizes the expected value in the same way as quantiles are a generalization of the median.
    • Added new statistical distributions.

      • Added scipy.stats.uniform_direction, a multivariate distribution to sample uniformly from the surface of a hypersphere.
      • Added scipy.stats.random_table, a multivariate distribution to sample uniformly from m x n contingency tables with provided marginals.
      • Added scipy.stats.truncpareto, the truncated Pareto distribution.
    • Improved the fit method of several distributions.

      • scipy.stats.skewnorm and scipy.stats.weibull_min now use an analytical solution when method='mm', which also serves a starting guess to improve the performance of method='mle'.
      • scipy.stats.gumbel_r and scipy.stats.gumbel_l: analytical maximum likelihood estimates have been extended to the cases in which location or scale are fixed by the user.
      • Analytical maximum likelihood estimates have been added for scipy.stats.powerlaw.
    • Improved random variate sampling of several distributions.

      • Drawing multiple samples from scipy.stats.matrix_normal, scipy.stats.ortho_group, scipy.stats.special_ortho_group, and scipy.stats.unitary_group is faster.
      • The rvs method of scipy.stats.vonmises now wraps to the interval [-np.pi, np.pi].
      • Improved the reliability of scipy.stats.loggamma rvs method for small values of the shape parameter.
    • Improved the speed and/or accuracy of functions of several statistical distributions.

      • Added scipy.stats.Covariance for better speed, accuracy, and user control in multivariate normal calculations.
      • scipy.stats.skewnorm methods cdf, sf, ppf, and isf methods now use the implementations from Boost, improving speed while maintaining accuracy. The calculation of higher-order moments is also faster and more accurate.
      • scipy.stats.invgauss methods ppf and isf methods now use the implementations from Boost, improving speed and accuracy.
      • scipy.stats.invweibull methods sf and isf are more accurate for small probability masses.
      • scipy.stats.nct and scipy.stats.ncx2 now rely on the implementations from Boost, improving speed and accuracy.
      • Implemented the logpdf method of scipy.stats.vonmises for reliability in extreme tails.
      • Implemented the isf method of scipy.stats.levy for speed and accuracy.
      • Improved the robustness of scipy.stats.studentized_range for large df by adding an infinite degree-of-freedom approximation.
      • Added a parameter lower_limit to scipy.stats.multivariate_normal, allowing the user to change the integration limit from -inf to a desired value.
      • Improved the robustness of entropy of scipy.stats.vonmises for large concentration values.
    • Enhanced scipy.stats.gaussian_kde.

      • Added scipy.stats.gaussian_kde.marginal, which returns the desired marginal distribution of the original kernel density estimate distribution.
      • The cdf method of scipy.stats.gaussian_kde now accepts a lower_limit parameter for integrating the PDF over a rectangular region.
      • Moved calculations for scipy.stats.gaussian_kde.logpdf to Cython, improving speed.
      • The global interpreter lock is released by the pdf method of scipy.stats.gaussian_kde for improved multithreading performance.
      • Replaced explicit matrix inversion with Cholesky decomposition for speed and accuracy.
    • Enhanced the result objects returned by many scipy.stats functions

      • Added a confidence_interval method to the result object returned by scipy.stats.ttest_1samp and scipy.stats.ttest_rel.
      • The scipy.stats functions combine_pvalues, fisher_exact, chi2_contingency, median_test and mood now return bunch objects rather than plain tuples, allowing attributes to be accessed by name.
      • Attributes of the result objects returned by multiscale_graphcorr, anderson_ksamp, binomtest, crosstab, pointbiserialr, spearmanr, kendalltau, and weightedtau have been renamed to statistic and pvalue for consistency throughout scipy.stats. Old attribute names are still allowed for backward compatibility.
      • scipy.stats.anderson now returns the parameters of the fitted distribution in a scipy.stats._result_classes.FitResult object.
      • The plot method of scipy.stats._result_classes.FitResult now accepts a plot_type parameter; the options are 'hist' (histogram, default), 'qq' (Q-Q plot), 'pp' (P-P plot), and 'cdf' (empirical CDF plot).
      • Kolmogorov-Smirnov tests (e.g. scipy.stats.kstest) now return the location (argmax) at which the statistic is calculated and the variant of the statistic used.
    • Improved the performance of several scipy.stats functions.

      • Improved the performance of scipy.stats.cramervonmises_2samp and scipy.stats.ks_2samp with method='exact'.
      • Improved the performance of scipy.stats.siegelslopes.
      • Improved the performance of scipy.stats.mstats.hdquantile_sd.
      • Improved the performance of scipy.stats.binned_statistic_dd for several NumPy statistics, and binned statistics methods now support complex data.
    • Added the scramble optional argument to scipy.stats.qmc.LatinHypercube. It replaces centered, which is now deprecated.

    • Added a parameter optimization to all scipy.stats.qmc.QMCEngine subclasses to improve characteristics of the quasi-random variates.

    • Added tie correction to scipy.stats.mood.

    • Added tutorials for resampling methods in scipy.stats.

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized, so passing the vectorized argument explicitly is no longer required to take advantage of vectorized statistics.

    • Improved the speed of scipy.stats.permutation_test for permutation types 'samples' and 'pairings'.

    • Added axis, nan_policy, and masked array support to scipy.stats.jarque_bera.

    • Added the nan_policy optional argument to scipy.stats.rankdata.

    Deprecated features

    • scipy.misc module and all the methods in misc are deprecated in v1.10 and will be completely removed in SciPy v2.0.0. Users are suggested to utilize the scipy.datasets module instead for the dataset methods.
    • scipy.stats.qmc.LatinHypercube parameter centered has been deprecated. It is replaced by the scramble argument for more consistency with other QMC engines.
    • scipy.interpolate.interp2d class has been deprecated. The docstring of the deprecated routine lists recommended replacements.

    Expired Deprecations

    • There is an ongoing effort to follow through on long-standing deprecations.

    • The following previously deprecated features are affected:

      • Removed cond & rcond kwargs in linalg.pinv
      • Removed wrappers scipy.linalg.blas.{clapack, flapack}
      • Removed scipy.stats.NumericalInverseHermite and removed tol & max_intervals kwargs from scipy.stats.sampling.NumericalInverseHermite
      • Removed local_search_options kwarg frrom scipy.optimize.dual_annealing.

    Other changes

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized by looking for an axis parameter in the signature of statistic. If an axis parameter is present in statistic but should not be relied on for vectorized calls, users must pass option vectorized==False explicitly.
    • scipy.stats.multivariate_normal will now raise a ValueError when the covariance matrix is not positive semidefinite, regardless of which method is called.

    Authors

    • Name (commits)
    • h-vetinari (10)
    • Jelle Aalbers (1)
    • Oriol Abril-Pla (1) +
    • Alan-Hung (1) +
    • Tania Allard (7)
    • Oren Amsalem (1) +
    • Sven Baars (10)
    • Balthasar (1) +
    • Ross Barnowski (1)
    • Christoph Baumgarten (2)
    • Peter Bell (2)
    • Sebastian Berg (1)
    • Aaron Berk (1) +
    • boatwrong (1) +
    • boeleman (1) +
    • Jake Bowhay (50)
    • Matthew Brett (4)
    • Evgeni Burovski (93)
    • Matthias Bussonnier (6)
    • Dominic C (2)
    • Mingbo Cai (1) +
    • James Campbell (2) +
    • CJ Carey (4)
    • cesaregarza (1) +
    • charlie0389 (1) +
    • Hood Chatham (5)
    • Andrew Chin (1) +
    • Daniel Ching (1) +
    • Leo Chow (1) +
    • chris (3) +
    • John Clow (1) +
    • cm7S (1) +
    • cmgodwin (1) +
    • Christopher Cowden (2) +
    • Henry Cuzco (2) +
    • Anirudh Dagar (12)
    • Hans Dembinski (2) +
    • Jaiden di Lanzo (24) +
    • Felipe Dias (1) +
    • Dieter Werthmüller (1)
    • Giuseppe Dilillo (1) +
    • dpoerio (1) +
    • drpeteb (1) +
    • Christopher Dupuis (1) +
    • Jordan Edmunds (1) +
    • Pieter Eendebak (1) +
    • Jérome Eertmans (1) +
    • Fabian Egli (2) +
    • Sebastian Ehlert (2) +
    • Kian Eliasi (1) +
    • Tomohiro Endo (1) +
    • Stefan Endres (1)
    • Zeb Engberg (4) +
    • Jonas Eschle (1) +
    • Thomas J. Fan (9)
    • fiveseven (1) +
    • Neil Flood (1) +
    • Franz Forstmayr (1)
    • Sara Fridovich-Keil (1)
    • David Gilbertson (1) +
    • Ralf Gommers (251)
    • Marco Gorelli (2) +
    • Matt Haberland (383)
    • Andrew Hawryluk (2) +
    • Christoph Hohnerlein (2) +
    • Loïc Houpert (2) +
    • Shamus Husheer (1) +
    • ideasrule (1) +
    • imoiwm (1) +
    • Lakshaya Inani (1) +
    • Joseph T. Iosue (1)
    • iwbc-mzk (1) +
    • Nathan Jacobi (3) +
    • Julien Jerphanion (5)
    • He Jia (1)
    • jmkuebler (1) +
    • Johannes Müller (1) +
    • Vedant Jolly (1) +
    • Juan Luis Cano Rodríguez (2)
    • Justin (1) +
    • jvavrek (1) +
    • jyuv (2)
    • Kai Mühlbauer (1) +
    • Nikita Karetnikov (3) +
    • Reinert Huseby Karlsen (1) +
    • kaspar (2) +
    • Toshiki Kataoka (1)
    • Robert Kern (3)
    • Joshua Klein (1) +
    • Andrew Knyazev (7)
    • Jozsef Kutas (16) +
    • Eric Larson (4)
    • Lechnio (1) +
    • Antony Lee (2)
    • Aditya Limaye (1) +
    • Xingyu Liu (2)
    • Christian Lorentzen (4)
    • Loïc Estève (2)
    • Thibaut Lunet (2) +
    • Peter Lysakovski (1)
    • marianasalamoni (2) +
    • mariprudencio (1) +
    • Paige Martin (1) +
    • Arno Marty (1) +
    • matthewborish (3) +
    • Damon McDougall (1)
    • Nicholas McKibben (22)
    • McLP (1) +
    • mdmahendri (1) +
    • Melissa Weber Mendonça (9)
    • Jarrod Millman (1)
    • Naoto Mizuno (2)
    • Shashaank N (1)
    • Pablo S Naharro (1) +
    • nboudrie (2) +
    • Andrew Nelson (52)
    • Nico Schlömer (1)
    • NiMlr (1) +
    • o-alexandre-felipe (1) +
    • Maureen Ononiwu (1) +
    • Dimitri Papadopoulos (2) +
    • partev (1) +
    • Tirth Patel (10)
    • Paulius Šarka (1) +
    • Josef Perktold (1)
    • Giacomo Petrillo (3) +
    • Matti Picus (1)
    • Rafael Pinto (1) +
    • PKNaveen (1) +
    • Ilhan Polat (6)
    • Akshita Prasanth (2) +
    • Sean Quinn (1)
    • Tyler Reddy (142)
    • Martin Reinecke (1)
    • Ned Richards (1)
    • Marie Roald (1) +
    • Sam Rosen (4) +
    • Pamphile Roy (105)
    • sabonerune (2) +
    • Atsushi Sakai (94)
    • Daniel Schmitz (27)
    • Anna Scholtz (1) +
    • Eli Schwartz (11)
    • serge-sans-paille (2)
    • JEEVANSHI SHARMA (1) +
    • ehsan shirvanian (2) +
    • siddhantwahal (2)
    • Mathieu Dutour Sikiric (1) +
    • Sourav Singh (1)
    • Alexander Soare (1) +
    • Bjørge Solli (2) +
    • Scott Staniewicz (1)
    • Albert Steppi (3)
    • Thomas Stoeger (1) +
    • Kai Striega (4)
    • Tartopohm (1) +
    • Mamoru TASAKA (2) +
    • Ewout ter Hoeven (5)
    • TianyiQ (1) +
    • Tiger (1) +
    • Will Tirone (1)
    • Edgar Andrés Margffoy Tuay (1) +
    • Dmitry Ulyumdzhiev (1) +
    • Hari Vamsi (1) +
    • VitalyChait (1) +
    • Rik Voorhaar (1) +
    • Samuel Wallan (4)
    • Stefan van der Walt (2)
    • Warren Weckesser (145)
    • wei2222 (1) +
    • windows-server-2003 (3) +
    • Marek Wojciechowski (2) +
    • Niels Wouda (1) +
    • WRKampi (1) +
    • Yeonjoo Yoo (1) +
    • Rory Yorke (1)
    • Xiao Yuan (2) +
    • Meekail Zain (2) +
    • Fabio Zanini (1) +
    • Steffen Zeile (1) +
    • Egor Zemlyanoy (19)
    • Gavin Zhang (3) +

    A total of 182 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(341.14 KB)
    README.txt(96.77 KB)
    scipy-1.10.0rc2-cp310-cp310-macosx_10_15_x86_64.whl(33.46 MB)
    scipy-1.10.0rc2-cp310-cp310-macosx_12_0_arm64.whl(27.43 MB)
    scipy-1.10.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.45 MB)
    scipy-1.10.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.82 MB)
    scipy-1.10.0rc2-cp310-cp310-win_amd64.whl(40.51 MB)
    scipy-1.10.0rc2-cp311-cp311-macosx_10_15_x86_64.whl(33.36 MB)
    scipy-1.10.0rc2-cp311-cp311-macosx_12_0_arm64.whl(27.37 MB)
    scipy-1.10.0rc2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.25 MB)
    scipy-1.10.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.54 MB)
    scipy-1.10.0rc2-cp311-cp311-win_amd64.whl(40.27 MB)
    scipy-1.10.0rc2-cp38-cp38-macosx_10_15_x86_64.whl(33.41 MB)
    scipy-1.10.0rc2-cp38-cp38-macosx_12_0_arm64.whl(27.45 MB)
    scipy-1.10.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.58 MB)
    scipy-1.10.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.93 MB)
    scipy-1.10.0rc2-cp38-cp38-win_amd64.whl(40.24 MB)
    scipy-1.10.0rc2-cp39-cp39-macosx_10_15_x86_64.whl(33.52 MB)
    scipy-1.10.0rc2-cp39-cp39-macosx_12_0_arm64.whl(27.55 MB)
    scipy-1.10.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.51 MB)
    scipy-1.10.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.85 MB)
    scipy-1.10.0rc2-cp39-cp39-win_amd64.whl(40.53 MB)
    scipy-1.10.0rc2.tar.gz(40.45 MB)
  • v1.10.0rc1(Dec 12, 2022)

    SciPy 1.10.0 Release Notes

    Note: SciPy 1.10.0 is not released yet!

    SciPy 1.10.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.10.x branch, and on adding new features on the main branch.

    This release requires Python 3.8+ and NumPy 1.19.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new dedicated datasets submodule (scipy.datasets) has been added, and is now preferred over usage of scipy.misc for dataset retrieval.
    • A new scipy.interpolate.make_smoothing_spline function was added. This function constructs a smoothing cubic spline from noisy data, using the generalized cross-validation (GCV) criterion to find the tradeoff between smoothness and proximity to data points.
    • scipy.stats has three new distributions, two new hypothesis tests, three new sample statistics, a class for greater control over calculations involving covariance matrices, and many other enhancements.

    New features

    scipy.datasets introduction

    • A new dedicated datasets submodule has been added. The submodules is meant for datasets that are relevant to other SciPy submodules ands content (tutorials, examples, tests), as well as contain a curated set of datasets that are of wider interest. As of this release, all the datasets from scipy.misc have been added to scipy.datasets (and deprecated in scipy.misc).

    • The submodule is based on Pooch (a new optional dependency for SciPy), a Python package to simplify fetching data files. This move will, in a subsequent release, facilitate SciPy to trim down the sdist/wheel sizes, by decoupling the data files and moving them out of the SciPy repository, hosting them externally and downloading them when requested. After downloading the datasets once, the files are cached to avoid network dependence and repeated usage.

    • Added datasets from scipy.misc: scipy.datasets.face, scipy.datasets.ascent, scipy.datasets.electrocardiogram

    • Added download and caching functionality:

      • scipy.datasets.download_all: a function to download all the scipy.datasets associated files at once.
      • scipy.datasets.clear_cache: a simple utility function to clear cached dataset files from the file system.
      • scipy/datasets/_download_all.py can be run as a standalone script for packaging purposes to avoid any external dependency at build or test time. This can be used by SciPy packagers (e.g., for Linux distros) which may have to adhere to rules that forbid downloading sources from external repositories at package build time.

    scipy.integrate improvements

    • Added scipy.integrate.qmc_quad, which performs quadrature using Quasi-Monte Carlo points.
    • Added parameter complex_func to scipy.integrate.quad, which can be set True to integrate a complex integrand.

    scipy.interpolate improvements

    • scipy.interpolate.interpn now supports tensor-product interpolation methods (slinear, cubic, quintic and pchip)
    • Tensor-product interpolation methods (slinear, cubic, quintic and pchip) in scipy.interpolate.interpn and scipy.interpolate.RegularGridInterpolator now allow values with trailing dimensions.
    • scipy.interpolate.RegularGridInterpolator has a new fast path for method="linear" with 2D data, and RegularGridInterpolator is now easier to subclass
    • scipy.interpolate.interp1d now can take a single value for non-spline methods.
    • A new extrapolate argument is available to scipy.interpolate.BSpline.design_matrix, allowing extrapolation based on the first and last intervals.
    • A new function scipy.interpolate.make_smoothing_spline has been added. It is an implementation of the generalized cross-validation spline smoothing algorithm. The lam=None (default) mode of this function is a clean-room reimplementation of the classic gcvspl.f Fortran algorithm for constructing GCV splines.
    • A new method="pchip" mode was aded to scipy.interpolate.RegularGridInterpolator. This mode constructs an interpolator using tensor products of C1-continuous monotone splines (essentially, a scipy.interpolate.PchipInterpolator instance per dimension).

    scipy.sparse.linalg improvements

    • The spectral 2-norm is now available in scipy.sparse.linalg.norm.

    • The performance of scipy.sparse.linalg.norm for the default case (Frobenius norm) has been improved.

    • LAPACK wrappers were added for trexc and trsen.

    • The scipy.sparse.linalg.lobpcg algorithm was rewritten, yielding the following improvements:

      • a simple tunable restart potentially increases the attainable accuracy for edge cases,
      • internal postprocessing runs one final exact Rayleigh-Ritz method giving more accurate and orthonormal eigenvectors,
      • output the computed iterate with the smallest max norm of the residual and drop the history of subsequent iterations,
      • remove the check for LinearOperator format input and thus allow a simple function handle of a callable object as an input,
      • better handling of common user errors with input data, rather than letting the algorithm fail.

    scipy.linalg improvements

    • scipy.linalg.lu_factor now accepts rectangular arrays instead of being restricted to square arrays.

    scipy.ndimage improvements

    • The new scipy.ndimage.value_indices function provides a time-efficient method to search for the locations of individual values with an array of image data.
    • A new radius argument is supported by scipy.ndimage.gaussian_filter1d and scipy.ndimage.gaussian_filter for adjusting the kernel size of the filter.

    scipy.optimize improvements

    • scipy.optimize.brute now coerces non-iterable/single-value args into a tuple.
    • scipy.optimize.least_squares and scipy.optimize.curve_fit now accept scipy.optimize.Bounds for bounds constraints.
    • Added a tutorial for scipy.optimize.milp.
    • Improved the pretty-printing of scipy.optimize.OptimizeResult objects.
    • Additional options (parallel, threads, mip_rel_gap) can now be passed to scipy.optimize.linprog with method='highs'.

    scipy.signal improvements

    • The new window function scipy.signal.windows.lanczos was added to compute a Lanczos window, also known as a sinc window.

    scipy.sparse.csgraph improvements

    • the performance of scipy.sparse.csgraph.dijkstra has been improved, and star graphs in particular see a marked performance improvement

    scipy.special improvements

    • The new function scipy.special.powm1, a ufunc with signature powm1(x, y), computes x**y - 1. The function avoids the loss of precision that can result when y is close to 0 or when x is close to 1.
    • scipy.special.erfinv is now more accurate as it leverages the Boost equivalent under the hood.

    scipy.stats improvements

    • Added scipy.stats.goodness_of_fit, a generalized goodness-of-fit test for use with any univariate distribution, any combination of known and unknown parameters, and several choices of test statistic (Kolmogorov-Smirnov, Cramer-von Mises, and Anderson-Darling).

    • Improved scipy.stats.bootstrap: Default method 'BCa' now supports multi-sample statistics. Also, the bootstrap distribution is returned in the result object, and the result object can be passed into the function as parameter bootstrap_result to add additional resamples or change the confidence interval level and type.

    • Added maximum spacing estimation to scipy.stats.fit.

    • Added the Poisson means test ("E-test") as scipy.stats.poisson_means_test.

    • Added new sample statistics.

      • Added scipy.stats.contingency.odds_ratio to compute both the conditional and unconditional odds ratios and corresponding confidence intervals for 2x2 contingency tables.
      • Added scipy.stats.directional_stats to compute sample statistics of n-dimensional directional data.
      • Added scipy.stats.expectile, which generalizes the expected value in the same way as quantiles are a generalization of the median.
    • Added new statistical distributions.

      • Added scipy.stats.uniform_direction, a multivariate distribution to sample uniformly from the surface of a hypersphere.
      • Added scipy.stats.random_table, a multivariate distribution to sample uniformly from m x n contingency tables with provided marginals.
      • Added scipy.stats.truncpareto, the truncated Pareto distribution.
    • Improved the fit method of several distributions.

      • scipy.stats.skewnorm and scipy.stats.weibull_min now use an analytical solution when method='mm', which also serves a starting guess to improve the performance of method='mle'.
      • scipy.stats.gumbel_r and scipy.stats.gumbel_l: analytical maximum likelihood estimates have been extended to the cases in which location or scale are fixed by the user.
      • Analytical maximum likelihood estimates have been added for scipy.stats.powerlaw.
    • Improved random variate sampling of several distributions.

      • Drawing multiple samples from scipy.stats.matrix_normal, scipy.stats.ortho_group, scipy.stats.special_ortho_group, and scipy.stats.unitary_group is faster.
      • The rvs method of scipy.stats.vonmises now wraps to the interval [-np.pi, np.pi].
      • Improved the reliability of scipy.stats.loggamma rvs method for small values of the shape parameter.
    • Improved the speed and/or accuracy of functions of several statistical distributions.

      • Added scipy.stats.Covariance for better speed, accuracy, and user control in multivariate normal calculations.
      • scipy.stats.skewnorm methods cdf, sf, ppf, and isf methods now use the implementations from Boost, improving speed while maintaining accuracy. The calculation of higher-order moments is also faster and more accurate.
      • scipy.stats.invgauss methods ppf and isf methods now use the implementations from Boost, improving speed and accuracy.
      • scipy.stats.invweibull methods sf and isf are more accurate for small probability masses.
      • scipy.stats.nct and scipy.stats.ncx2 now rely on the implementations from Boost, improving speed and accuracy.
      • Implemented the logpdf method of scipy.stats.vonmises for reliability in extreme tails.
      • Implemented the isf method of scipy.stats.levy for speed and accuracy.
      • Improved the robustness of scipy.stats.studentized_range for large df by adding an infinite degree-of-freedom approximation.
      • Added a parameter lower_limit to scipy.stats.multivariate_normal, allowing the user to change the integration limit from -inf to a desired value.
      • Improved the robustness of entropy of scipy.stats.vonmises for large concentration values.
    • Enhanced scipy.stats.gaussian_kde.

      • Added scipy.stats.gaussian_kde.marginal, which returns the desired marginal distribution of the original kernel density estimate distribution.
      • The cdf method of scipy.stats.gaussian_kde now accepts a lower_limit parameter for integrating the PDF over a rectangular region.
      • Moved calculations for scipy.stats.gaussian_kde.logpdf to Cython, improving speed.
      • The global interpreter lock is released by the pdf method of scipy.stats.gaussian_kde for improved multithreading performance.
      • Replaced explicit matrix inversion with Cholesky decomposition for speed and accuracy.
    • Enhanced the result objects returned by many scipy.stats functions

      • Added a confidence_interval method to the result object returned by scipy.stats.ttest_1samp and scipy.stats.ttest_rel.
      • The scipy.stats functions combine_pvalues, fisher_exact, chi2_contingency, median_test and mood now return bunch objects rather than plain tuples, allowing attributes to be accessed by name.
      • Attributes of the result objects returned by multiscale_graphcorr, anderson_ksamp, binomtest, crosstab, pointbiserialr, spearmanr, kendalltau, and weightedtau have been renamed to statistic and pvalue for consistency throughout scipy.stats. Old attribute names are still allowed for backward compatibility.
      • scipy.stats.anderson now returns the parameters of the fitted distribution in a scipy.stats._result_classes.FitResult object.
      • The plot method of scipy.stats._result_classes.FitResult now accepts a plot_type parameter; the options are 'hist' (histogram, default), 'qq' (Q-Q plot), 'pp' (P-P plot), and 'cdf' (empirical CDF plot).
      • Kolmogorov-Smirnov tests (e.g. scipy.stats.kstest) now return the location (argmax) at which the statistic is calculated and the variant of the statistic used.
    • Improved the performance of several scipy.stats functions.

      • Improved the performance of scipy.stats.cramervonmises_2samp and scipy.stats.ks_2samp with method='exact'.
      • Improved the performance of scipy.stats.siegelslopes.
      • Improved the performance of scipy.stats.mstats.hdquantile_sd.
      • Improved the performance of scipy.stats.binned_statistic_dd for several NumPy statistics, and binned statistics methods now support complex data.
    • Added the scramble optional argument to scipy.stats.qmc.LatinHypercube. It replaces centered, which is now deprecated.

    • Added a parameter optimization to all scipy.stats.qmc.QMCEngine subclasses to improve characteristics of the quasi-random variates.

    • Added tie correction to scipy.stats.mood.

    • Added tutorials for resampling methods in scipy.stats.

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized, so passing the vectorized argument explicitly is no longer required to take advantage of vectorized statistics.

    • Improved the speed of scipy.stats.permutation_test for permutation types 'samples' and 'pairings'.

    • Added axis, nan_policy, and masked array support to scipy.stats.jarque_bera.

    • Added the nan_policy optional argument to scipy.stats.rankdata.

    Deprecated features

    • scipy.misc module and all the methods in misc are deprecated in v1.10 and will be completely removed in SciPy v2.0.0. Users are suggested to utilize the scipy.datasets module instead for the dataset methods.
    • scipy.stats.qmc.LatinHypercube parameter centered has been deprecated. It is replaced by the scramble argument for more consistency with other QMC engines.
    • scipy.interpolate.interp2d class has been deprecated. The docstring of the deprecated routine lists recommended replacements.

    Expired Deprecations

    • There is an ongoing effort to follow through on long-standing deprecations.

    • The following previously deprecated features are affected:

      • Removed cond & rcond kwargs in linalg.pinv
      • Removed wrappers scipy.linalg.blas.{clapack, flapack}
      • Removed scipy.stats.NumericalInverseHermite and removed tol & max_intervals kwargs from scipy.stats.sampling.NumericalInverseHermite
      • Removed local_search_options kwarg frrom scipy.optimize.dual_annealing.

    Other changes

    • scipy.stats.bootstrap, scipy.stats.permutation_test, and scipy.stats.monte_carlo_test now automatically detect whether the provided statistic is vectorized by looking for an axis parameter in the signature of statistic. If an axis parameter is present in statistic but should not be relied on for vectorized calls, users must pass option vectorized==False explicitly.
    • scipy.stats.multivariate_normal will now raise a ValueError when the covariance matrix is not positive semidefinite, regardless of which method is called.

    Authors

    • Name (commits)
    • h-vetinari (10)
    • Jelle Aalbers (1)
    • Alan-Hung (1) +
    • Tania Allard (7)
    • Oren Amsalem (1) +
    • Sven Baars (10)
    • Balthasar (1) +
    • Ross Barnowski (1)
    • Christoph Baumgarten (2)
    • Peter Bell (2)
    • Sebastian Berg (1)
    • Aaron Berk (1) +
    • boatwrong (1) +
    • Jake Bowhay (50)
    • Matthew Brett (4)
    • Evgeni Burovski (93)
    • Matthias Bussonnier (6)
    • Dominic C (2)
    • Mingbo Cai (1) +
    • James Campbell (2) +
    • CJ Carey (4)
    • cesaregarza (1) +
    • charlie0389 (1) +
    • Hood Chatham (5)
    • Andrew Chin (1) +
    • Daniel Ching (1) +
    • Leo Chow (1) +
    • chris (3) +
    • John Clow (1) +
    • cm7S (1) +
    • cmgodwin (1) +
    • Christopher Cowden (2) +
    • Henry Cuzco (2) +
    • Anirudh Dagar (10)
    • Hans Dembinski (2) +
    • Jaiden di Lanzo (24) +
    • Felipe Dias (1) +
    • Dieter Werthmüller (1)
    • Giuseppe Dilillo (1) +
    • dpoerio (1) +
    • drpeteb (1) +
    • Christopher Dupuis (1) +
    • Jordan Edmunds (1) +
    • Pieter Eendebak (1) +
    • Jérome Eertmans (1) +
    • Fabian Egli (2) +
    • Sebastian Ehlert (2) +
    • Kian Eliasi (1) +
    • Tomohiro Endo (1) +
    • Stefan Endres (1)
    • Zeb Engberg (4) +
    • Jonas Eschle (1) +
    • Thomas J. Fan (9)
    • fiveseven (1) +
    • Neil Flood (1) +
    • Franz Forstmayr (1)
    • Sara Fridovich-Keil (1)
    • David Gilbertson (1) +
    • Ralf Gommers (251)
    • Marco Gorelli (2) +
    • Matt Haberland (381)
    • Andrew Hawryluk (2) +
    • Christoph Hohnerlein (2) +
    • Loïc Houpert (2) +
    • Shamus Husheer (1) +
    • ideasrule (1) +
    • imoiwm (1) +
    • Lakshaya Inani (1) +
    • Joseph T. Iosue (1)
    • iwbc-mzk (1) +
    • Nathan Jacobi (3) +
    • Julien Jerphanion (5)
    • He Jia (1)
    • jmkuebler (1) +
    • Johannes Müller (1) +
    • Vedant Jolly (1) +
    • Juan Luis Cano Rodríguez (2)
    • Justin (1) +
    • jvavrek (1) +
    • jyuv (2)
    • Kai Mühlbauer (1) +
    • Nikita Karetnikov (3) +
    • Reinert Huseby Karlsen (1) +
    • kaspar (2) +
    • Toshiki Kataoka (1)
    • Robert Kern (3)
    • Joshua Klein (1) +
    • Andrew Knyazev (7)
    • Jozsef Kutas (16) +
    • Eric Larson (4)
    • Lechnio (1) +
    • Antony Lee (2)
    • Aditya Limaye (1) +
    • Xingyu Liu (2)
    • Christian Lorentzen (4)
    • Loïc Estève (2)
    • Thibaut Lunet (2) +
    • Peter Lysakovski (1)
    • marianasalamoni (2) +
    • mariprudencio (1) +
    • Paige Martin (1) +
    • Arno Marty (1) +
    • matthewborish (3) +
    • Damon McDougall (1)
    • Nicholas McKibben (22)
    • McLP (1) +
    • mdmahendri (1) +
    • Melissa Weber Mendonça (9)
    • Jarrod Millman (1)
    • Naoto Mizuno (2)
    • Shashaank N (1)
    • Pablo S Naharro (1) +
    • nboudrie (1) +
    • Andrew Nelson (52)
    • Nico Schlömer (1)
    • NiMlr (1) +
    • o-alexandre-felipe (1) +
    • Maureen Ononiwu (1) +
    • Dimitri Papadopoulos (2) +
    • partev (1) +
    • Tirth Patel (10)
    • Paulius Šarka (1) +
    • Josef Perktold (1)
    • Giacomo Petrillo (3) +
    • Matti Picus (1)
    • Rafael Pinto (1) +
    • PKNaveen (1) +
    • Ilhan Polat (6)
    • Akshita Prasanth (2) +
    • Sean Quinn (1)
    • Tyler Reddy (117)
    • Martin Reinecke (1)
    • Ned Richards (1)
    • Marie Roald (1) +
    • Sam Rosen (4) +
    • Pamphile Roy (103)
    • sabonerune (2) +
    • Atsushi Sakai (94)
    • Daniel Schmitz (27)
    • Anna Scholtz (1) +
    • Eli Schwartz (11)
    • serge-sans-paille (2)
    • JEEVANSHI SHARMA (1) +
    • ehsan shirvanian (2) +
    • siddhantwahal (2)
    • Mathieu Dutour Sikiric (1) +
    • Sourav Singh (1)
    • Alexander Soare (1) +
    • Bjørge Solli (2) +
    • Scott Staniewicz (1)
    • Albert Steppi (3)
    • Thomas Stoeger (1) +
    • Kai Striega (4)
    • Tartopohm (1) +
    • Mamoru TASAKA (2) +
    • Ewout ter Hoeven (5)
    • TianyiQ (1) +
    • Tiger (1) +
    • Will Tirone (1)
    • Edgar Andrés Margffoy Tuay (1) +
    • Dmitry Ulyumdzhiev (1) +
    • Hari Vamsi (1) +
    • VitalyChait (1) +
    • Rik Voorhaar (1) +
    • Samuel Wallan (4)
    • Stefan van der Walt (2)
    • Warren Weckesser (145)
    • wei2222 (1) +
    • windows-server-2003 (3) +
    • Marek Wojciechowski (2) +
    • Niels Wouda (1) +
    • WRKampi (1) +
    • Yeonjoo Yoo (1) +
    • Rory Yorke (1)
    • Xiao Yuan (2) +
    • Meekail Zain (2) +
    • Fabio Zanini (1) +
    • Steffen Zeile (1) +
    • Egor Zemlyanoy (19)
    • Gavin Zhang (3) +

    A total of 180 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(333.36 KB)
    README.txt(95.09 KB)
    scipy-1.10.0rc1-cp310-cp310-macosx_10_15_x86_64.whl(33.46 MB)
    scipy-1.10.0rc1-cp310-cp310-macosx_12_0_arm64.whl(27.43 MB)
    scipy-1.10.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.44 MB)
    scipy-1.10.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.81 MB)
    scipy-1.10.0rc1-cp310-cp310-win_amd64.whl(40.51 MB)
    scipy-1.10.0rc1-cp311-cp311-macosx_10_15_x86_64.whl(33.36 MB)
    scipy-1.10.0rc1-cp311-cp311-macosx_12_0_arm64.whl(27.37 MB)
    scipy-1.10.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.25 MB)
    scipy-1.10.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.54 MB)
    scipy-1.10.0rc1-cp311-cp311-win_amd64.whl(40.26 MB)
    scipy-1.10.0rc1-cp38-cp38-macosx_10_15_x86_64.whl(33.41 MB)
    scipy-1.10.0rc1-cp38-cp38-macosx_12_0_arm64.whl(27.45 MB)
    scipy-1.10.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.58 MB)
    scipy-1.10.0rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.93 MB)
    scipy-1.10.0rc1-cp38-cp38-win_amd64.whl(40.24 MB)
    scipy-1.10.0rc1-cp39-cp39-macosx_10_15_x86_64.whl(33.52 MB)
    scipy-1.10.0rc1-cp39-cp39-macosx_12_0_arm64.whl(27.55 MB)
    scipy-1.10.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(29.51 MB)
    scipy-1.10.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.85 MB)
    scipy-1.10.0rc1-cp39-cp39-win_amd64.whl(40.53 MB)
    scipy-1.10.0rc1.tar.gz(40.45 MB)
  • v1.9.3(Oct 20, 2022)

    SciPy 1.9.3 Release Notes

    SciPy 1.9.3 is a bug-fix release with no new features compared to 1.9.2.

    Authors

    • Jelle Aalbers (1)
    • Peter Bell (1)
    • Jake Bowhay (3)
    • Matthew Brett (3)
    • Evgeni Burovski (5)
    • drpeteb (1) +
    • Sebastian Ehlert (1) +
    • GavinZhang (1) +
    • Ralf Gommers (2)
    • Matt Haberland (15)
    • Lakshaya Inani (1) +
    • Joseph T. Iosue (1)
    • Nathan Jacobi (1) +
    • jmkuebler (1) +
    • Nikita Karetnikov (1) +
    • Lechnio (1) +
    • Nicholas McKibben (1)
    • Andrew Nelson (1)
    • o-alexandre-felipe (1) +
    • Tirth Patel (1)
    • Tyler Reddy (51)
    • Martin Reinecke (1)
    • Marie Roald (1) +
    • Pamphile Roy (2)
    • Eli Schwartz (1)
    • serge-sans-paille (1)
    • ehsan shirvanian (1) +
    • Mamoru TASAKA (1) +
    • Samuel Wallan (1)
    • Warren Weckesser (7)
    • Gavin Zhang (1) +

    A total of 31 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(18.24 KB)
    README.txt(12.85 KB)
    scipy-1.9.3-cp310-cp310-macosx_10_9_x86_64.whl(32.66 MB)
    scipy-1.9.3-cp310-cp310-macosx_12_0_arm64.whl(27.15 MB)
    scipy-1.9.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.68 MB)
    scipy-1.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.13 MB)
    scipy-1.9.3-cp310-cp310-win_amd64.whl(38.28 MB)
    scipy-1.9.3-cp311-cp311-macosx_10_9_x86_64.whl(32.58 MB)
    scipy-1.9.3-cp311-cp311-macosx_12_0_arm64.whl(27.08 MB)
    scipy-1.9.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.47 MB)
    scipy-1.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(31.88 MB)
    scipy-1.9.3-cp311-cp311-win_amd64.whl(38.03 MB)
    scipy-1.9.3-cp38-cp38-macosx_10_9_x86_64.whl(32.58 MB)
    scipy-1.9.3-cp38-cp38-macosx_12_0_arm64.whl(27.16 MB)
    scipy-1.9.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.97 MB)
    scipy-1.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.21 MB)
    scipy-1.9.3-cp38-cp38-win_amd64.whl(37.93 MB)
    scipy-1.9.3-cp39-cp39-macosx_10_9_x86_64.whl(32.74 MB)
    scipy-1.9.3-cp39-cp39-macosx_12_0_arm64.whl(27.26 MB)
    scipy-1.9.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.74 MB)
    scipy-1.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.19 MB)
    scipy-1.9.3-cp39-cp39-win_amd64.whl(38.29 MB)
    scipy-1.9.3.tar.gz(40.12 MB)
  • v1.9.2(Oct 8, 2022)

    SciPy 1.9.2 Release Notes

    SciPy 1.9.2 is a bug-fix release with no new features compared to 1.9.1. It also provides wheels for Python 3.11 on several platforms.

    Authors

    • Hood Chatham (1)
    • Thomas J. Fan (1)
    • Ralf Gommers (22)
    • Matt Haberland (5)
    • Julien Jerphanion (1)
    • Loïc Estève (1)
    • Nicholas McKibben (2)
    • Naoto Mizuno (1)
    • Andrew Nelson (3)
    • Tyler Reddy (28)
    • Pamphile Roy (1)
    • Ewout ter Hoeven (2)
    • Warren Weckesser (1)
    • Meekail Zain (1) +

    A total of 14 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(11.90 KB)
    README.txt(8.58 KB)
    scipy-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl(32.66 MB)
    scipy-1.9.2-cp310-cp310-macosx_12_0_arm64.whl(27.14 MB)
    scipy-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.67 MB)
    scipy-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.12 MB)
    scipy-1.9.2-cp310-cp310-win_amd64.whl(38.27 MB)
    scipy-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl(32.57 MB)
    scipy-1.9.2-cp311-cp311-macosx_12_0_arm64.whl(27.07 MB)
    scipy-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.46 MB)
    scipy-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(31.87 MB)
    scipy-1.9.2-cp311-cp311-win_amd64.whl(38.02 MB)
    scipy-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl(32.57 MB)
    scipy-1.9.2-cp38-cp38-macosx_12_0_arm64.whl(27.15 MB)
    scipy-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.96 MB)
    scipy-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.20 MB)
    scipy-1.9.2-cp38-cp38-win_amd64.whl(37.92 MB)
    scipy-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl(32.73 MB)
    scipy-1.9.2-cp39-cp39-macosx_12_0_arm64.whl(27.25 MB)
    scipy-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(28.73 MB)
    scipy-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(32.19 MB)
    scipy-1.9.2-cp39-cp39-win_amd64.whl(38.28 MB)
    scipy-1.9.2.tar.gz(40.11 MB)
  • v1.9.1(Aug 27, 2022)

    SciPy 1.9.1 Release Notes

    SciPy 1.9.1 is a bug-fix release with no new features compared to 1.9.0. Notably, some important meson build fixes are included.

    Authors

    • Anirudh Dagar (1)
    • Ralf Gommers (12)
    • Matt Haberland (2)
    • Andrew Nelson (1)
    • Tyler Reddy (14)
    • Atsushi Sakai (1)
    • Eli Schwartz (1)
    • Warren Weckesser (2)

    A total of 8 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(10.63 KB)
    README.txt(7.69 KB)
    scipy-1.9.1-cp310-cp310-macosx_10_9_x86_64.whl(35.05 MB)
    scipy-1.9.1-cp310-cp310-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.1-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.72 MB)
    scipy-1.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.28 MB)
    scipy-1.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.86 MB)
    scipy-1.9.1-cp310-cp310-win_amd64.whl(36.77 MB)
    scipy-1.9.1-cp38-cp38-macosx_10_9_x86_64.whl(34.87 MB)
    scipy-1.9.1-cp38-cp38-macosx_12_0_arm64.whl(28.39 MB)
    scipy-1.9.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.42 MB)
    scipy-1.9.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(36.00 MB)
    scipy-1.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.46 MB)
    scipy-1.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.35 MB)
    scipy-1.9.1-cp38-cp38-win32.whl(32.94 MB)
    scipy-1.9.1-cp38-cp38-win_amd64.whl(36.78 MB)
    scipy-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl(35.03 MB)
    scipy-1.9.1-cp39-cp39-macosx_12_0_arm64.whl(28.49 MB)
    scipy-1.9.1-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.69 MB)
    scipy-1.9.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(36.20 MB)
    scipy-1.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.85 MB)
    scipy-1.9.1-cp39-cp39-win32.whl(32.97 MB)
    scipy-1.9.1-cp39-cp39-win_amd64.whl(36.82 MB)
    scipy-1.9.1.tar.gz(40.07 MB)
  • v1.9.0(Jul 29, 2022)

    SciPy 1.9.0 Release Notes

    SciPy 1.9.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.9.x branch, and on adding new features on the main branch.

    This release requires Python 3.8-3.11 and NumPy 1.18.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • We have modernized our build system to use meson, substantially improving our build performance, and providing better build-time configuration and cross-compilation support,
    • Added scipy.optimize.milp, new function for mixed-integer linear programming,
    • Added scipy.stats.fit for fitting discrete and continuous distributions to data,
    • Tensor-product spline interpolation modes were added to scipy.interpolate.RegularGridInterpolator,
    • A new global optimizer (DIviding RECTangles algorithm) scipy.optimize.direct.

    New features

    scipy.interpolate improvements

    • Speed up the RBFInterpolator evaluation with high dimensional interpolants.
    • Added new spline based interpolation methods for scipy.interpolate.RegularGridInterpolator and its tutorial.
    • scipy.interpolate.RegularGridInterpolator and scipy.interpolate.interpn now accept descending ordered points.
    • RegularGridInterpolator now handles length-1 grid axes.
    • The BivariateSpline subclasses have a new method partial_derivative which constructs a new spline object representing a derivative of an original spline. This mirrors the corresponding functionality for univariate splines, splder and BSpline.derivative, and can substantially speed up repeated evaluation of derivatives.

    scipy.linalg improvements

    • scipy.linalg.expm now accepts nD arrays. Its speed is also improved.
    • Minimum required LAPACK version is bumped to 3.7.1.

    scipy.fft improvements

    • Added uarray multimethods for scipy.fft.fht and scipy.fft.ifht to allow provision of third party backend implementations such as those recently added to CuPy.

    scipy.optimize improvements

    • A new global optimizer, scipy.optimize.direct (DIviding RECTangles algorithm) was added. For problems with inexpensive function evaluations, like the ones in the SciPy benchmark suite, direct is competitive with the best other solvers in SciPy (dual_annealing and differential_evolution) in terms of execution time. See gh-14300 <https://github.com/scipy/scipy/pull/14300>__ for more details.

    • Add a full_output parameter to scipy.optimize.curve_fit to output additional solution information.

    • Add a integrality parameter to scipy.optimize.differential_evolution, enabling integer constraints on parameters.

    • Add a vectorized parameter to call a vectorized objective function only once per iteration. This can improve minimization speed by reducing interpreter overhead from the multiple objective function calls.

    • The default method of scipy.optimize.linprog is now 'highs'.

    • Added scipy.optimize.milp, new function for mixed-integer linear programming.

    • Added Newton-TFQMR method to newton_krylov.

    • Added support for the Bounds class in shgo and dual_annealing for a more uniform API across scipy.optimize.

    • Added the vectorized keyword to differential_evolution.

    • approx_fprime now works with vector-valued functions.

    scipy.signal improvements

    • The new window function scipy.signal.windows.kaiser_bessel_derived was added to compute the Kaiser-Bessel derived window.
    • Single-precision hilbert operations are now faster as a result of more consistent dtype handling.

    scipy.sparse improvements

    • Add a copy parameter to scipy.sparce.csgraph.laplacian. Using inplace computation with copy=False reduces the memory footprint.
    • Add a dtype parameter to scipy.sparce.csgraph.laplacian for type casting.
    • Add a symmetrized parameter to scipy.sparce.csgraph.laplacian to produce symmetric Laplacian for directed graphs.
    • Add a form parameter to scipy.sparce.csgraph.laplacian taking one of the three values: array, or function, or lo determining the format of the output Laplacian:
      • array is a numpy array (backward compatible default);
      • function is a pointer to a lambda-function evaluating the Laplacian-vector or Laplacian-matrix product;
      • lo results in the format of the LinearOperator.

    scipy.sparse.linalg improvements

    • lobpcg performance improvements for small input cases.

    scipy.spatial improvements

    • Add an order parameter to scipy.spatial.transform.Rotation.from_quat and scipy.spatial.transform.Rotation.as_quat to specify quaternion format.

    scipy.stats improvements

    • scipy.stats.monte_carlo_test performs one-sample Monte Carlo hypothesis tests to assess whether a sample was drawn from a given distribution. Besides reproducing the results of hypothesis tests like scipy.stats.ks_1samp, scipy.stats.normaltest, and scipy.stats.cramervonmises without small sample size limitations, it makes it possible to perform similar tests using arbitrary statistics and distributions.

    • Several scipy.stats functions support new axis (integer or tuple of integers) and nan_policy ('raise', 'omit', or 'propagate'), and keepdims arguments. These functions also support masked arrays as inputs, even if they do not have a scipy.stats.mstats counterpart. Edge cases for multidimensional arrays, such as when axis-slices have no unmasked elements or entire inputs are of size zero, are handled consistently.

    • Add a weight parameter to scipy.stats.hmean.

    • Several improvements have been made to scipy.stats.levy_stable. Substantial improvement has been made for numerical evaluation of the pdf and cdf, resolving #12658 and #14944. The improvement is particularly dramatic for stability parameter alpha close to or equal to 1 and for alpha below but approaching its maximum value of 2. The alternative fast Fourier transform based method for pdf calculation has also been updated to use the approach of Wang and Zhang from their 2008 conference paper Simpson’s rule based FFT method to compute densities of stable distribution, making this method more competitive with the default method. In addition, users now have the option to change the parametrization of the Levy Stable distribution to Nolan's "S0" parametrization which is used internally by SciPy's pdf and cdf implementations. The "S0" parametrization is described in Nolan's paper Numerical calculation of stable densities and distribution functions upon which SciPy's implementation is based. "S0" has the advantage that delta and gamma are proper location and scale parameters. With delta and gamma fixed, the location and scale of the resulting distribution remain unchanged as alpha and beta change. This is not the case for the default "S1" parametrization. Finally, more options have been exposed to allow users to trade off between runtime and accuracy for both the default and FFT methods of pdf and cdf calculation. More information can be found in the documentation here (to be linked).

    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.

    • The methods "pearson" and "tippet" from scipy.stats.combine_pvalues have been fixed to return the correct p-values, resolving #15373. In addition, the documentation for scipy.stats.combine_pvalues has been expanded and improved.

    • Unlike other reduction functions, stats.mode didn't consume the axis being operated on and failed for negative axis inputs. Both the bugs have been fixed. Note that stats.mode will now consume the input axis and return an ndarray with the axis dimension removed.

    • Replaced implementation of scipy.stats.ncf with the implementation from Boost for improved reliability.

    • Add a bits parameter to scipy.stats.qmc.Sobol. It allows to use from 0 to 64 bits to compute the sequence. Default is None which corresponds to 30 for backward compatibility. Using a higher value allow to sample more points. Note: bits does not affect the output dtype.

    • Add a integers method to scipy.stats.qmc.QMCEngine. It allows sampling integers using any QMC sampler.

    • Improved the fit speed and accuracy of stats.pareto.

    • Added qrvs method to NumericalInversePolynomial to match the situation for NumericalInverseHermite.

    • Faster random variate generation for gennorm and nakagami.

    • lloyd_centroidal_voronoi_tessellation has been added to allow improved sample distributions via iterative application of Voronoi diagrams and centering operations

    • Add scipy.stats.qmc.PoissonDisk to sample using the Poisson disk sampling method. It guarantees that samples are separated from each other by a given radius.

    • Add scipy.stats.pmean to calculate the weighted power mean also called generalized mean.

    Deprecated features

    • Due to collision with the shape parameter n of several distributions, use of the distribution moment method with keyword argument n is deprecated. Keyword n is replaced with keyword order.
    • Similarly, use of the distribution interval method with keyword arguments alpha is deprecated. Keyword alpha is replaced with keyword confidence.
    • The 'simplex', 'revised simplex', and 'interior-point' methods of scipy.optimize.linprog are deprecated. Methods highs, highs-ds, or highs-ipm should be used in new code.
    • Support for non-numeric arrays has been deprecated from stats.mode. pandas.DataFrame.mode can be used instead.
    • The function spatial.distance.kulsinski has been deprecated in favor of spatial.distance.kulczynski1.
    • The maxiter keyword of the truncated Newton (TNC) algorithm has been deprecated in favour of maxfun.
    • The vertices keyword of Delauney.qhull now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.
    • The extradoc keyword of rv_continuous, rv_discrete and rv_sample now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.

    Expired Deprecations

    There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:

    • Object arrays in sparse matrices now raise an error.
    • Inexact indices into sparse matrices now raise an error.
    • Passing radius=None to scipy.spatial.SphericalVoronoi now raises an error (not adding radius defaults to 1, as before).
    • Several BSpline methods now raise an error if inputs have ndim > 1.
    • The _rvs method of statistical distributions now requires a size parameter.
    • Passing a fillvalue that cannot be cast to the output type in scipy.signal.convolve2d now raises an error.
    • scipy.spatial.distance now enforces that the input vectors are one-dimensional.
    • Removed stats.itemfreq.
    • Removed stats.median_absolute_deviation.
    • Removed n_jobs keyword argument and use of k=None from kdtree.query.
    • Removed right keyword from interpolate.PPoly.extend.
    • Removed debug keyword from scipy.linalg.solve_*.
    • Removed class _ppform scipy.interpolate.
    • Removed BSR methods matvec and matmat.
    • Removed mlab truncation mode from cluster.dendrogram.
    • Removed cluster.vq.py_vq2.
    • Removed keyword arguments ftol and xtol from optimize.minimize(method='Nelder-Mead').
    • Removed signal.windows.hanning.
    • Removed LAPACK gegv functions from linalg; this raises the minimally required LAPACK version to 3.7.1.
    • Removed spatial.distance.matching.
    • Removed the alias scipy.random for numpy.random.
    • Removed docstring related functions from scipy.misc (docformat, inherit_docstring_from, extend_notes_in_docstring, replace_notes_in_docstring, indentcount_lines, filldoc, unindent_dict, unindent_string).
    • Removed linalg.pinv2.

    Backwards incompatible changes

    • Several scipy.stats functions now convert np.matrix to np.ndarrays before the calculation is performed. In this case, the output will be a scalar or np.ndarray of appropriate shape rather than a 2D np.matrix. Similarly, while masked elements of masked arrays are still ignored, the output will be a scalar or np.ndarray rather than a masked array with mask=False.
    • The default method of scipy.optimize.linprog is now 'highs', not 'interior-point' (which is now deprecated), so callback functions and some options are no longer supported with the default method. With the default method, the x attribute of the returned OptimizeResult is now None (instead of a non-optimal array) when an optimal solution cannot be found (e.g. infeasible problem).
    • For scipy.stats.combine_pvalues, the sign of the test statistic returned for the method "pearson" has been flipped so that higher values of the statistic now correspond to lower p-values, making the statistic more consistent with those of the other methods and with the majority of the literature.
    • scipy.linalg.expm due to historical reasons was using the sparse implementation and thus was accepting sparse arrays. Now it only works with nDarrays. For sparse usage, scipy.sparse.linalg.expm needs to be used explicitly.
    • The definition of scipy.stats.circvar has reverted to the one that is standard in the literature; note that this is not the same as the square of scipy.stats.circstd.
    • Remove inheritance to QMCEngine in MultinomialQMC and MultivariateNormalQMC. It removes the methods fast_forward and reset.
    • Init of MultinomialQMC now require the number of trials with n_trials. Hence, MultinomialQMC.random output has now the correct shape (n, pvals).
    • Several function-specific warnings (F_onewayConstantInputWarning, F_onewayBadInputSizesWarning, PearsonRConstantInputWarning, PearsonRNearConstantInputWarning, SpearmanRConstantInputWarning, and BootstrapDegenerateDistributionWarning) have been replaced with more general warnings.

    Other changes

    • A draft developer CLI is available for SciPy, leveraging the doit, click and rich-click tools. For more details, see gh-15959.

    • The SciPy contributor guide has been reorganized and updated (see #15947 for details).

    • QUADPACK Fortran routines in scipy.integrate, which power scipy.integrate.quad, have been marked as recursive. This should fix rare issues in multivariate integration (nquad and friends) and obviate the need for compiler-specific compile flags (/recursive for ifort etc). Please file an issue if this change turns out problematic for you. This is also true for FITPACK routines in scipy.interpolate, which power splrep, splev etc., and *UnivariateSpline and *BivariateSpline classes.

    • the USE_PROPACK environment variable has been renamed to SCIPY_USE_PROPACK; setting to a non-zero value will enable the usage of the PROPACK library as before

    • Building SciPy on windows with MSVC now requires at least the vc142 toolset (available in Visual Studio 2019 and higher).

    Lazy access to subpackages

    Before this release, all subpackages of SciPy (cluster, fft, ndimage, etc.) had to be explicitly imported. Now, these subpackages are lazily loaded as soon as they are accessed, so that the following is possible (if desired for interactive use, it's not actually recommended for code, see :ref:scipy-api): import scipy as sp; sp.fft.dct([1, 2, 3]). Advantages include: making it easier to navigate SciPy in interactive terminals, reducing subpackage import conflicts (which before required import networkx.linalg as nla; import scipy.linalg as sla), and avoiding repeatedly having to update imports during teaching & experimentation. Also see the related community specification document.

    SciPy switched to Meson as its build system

    This is the first release that ships with Meson as the build system. When installing with pip or pypa/build, Meson will be used (invoked via the meson-python build hook). This change brings significant benefits - most importantly much faster build times, but also better support for cross-compilation and cleaner build logs.

    Note:

    This release still ships with support for numpy.distutils-based builds as well. Those can be invoked through the setup.py command-line interface (e.g., python setup.py install). It is planned to remove numpy.distutils support before the 1.10.0 release.

    When building from source, a number of things have changed compared to building with numpy.distutils:

    • New build dependencies: meson, ninja, and pkg-config. setuptools and wheel are no longer needed.
    • BLAS and LAPACK libraries that are supported haven't changed, however the discovery mechanism has: that is now using pkg-config instead of hardcoded paths or a site.cfg file.
    • The build defaults to using OpenBLAS. See :ref:blas-lapack-selection for details.

    The two CLIs that can be used to build wheels are pip and build. In addition, the SciPy repo contains a python dev.py CLI for any kind of development task (see its --help for details). For a comparison between old (distutils) and new (meson) build commands, see :ref:meson-faq.

    For more information on the introduction of Meson support in SciPy, see gh-13615 <https://github.com/scipy/scipy/issues/13615>__ and this blog post <https://labs.quansight.org/blog/2021/07/moving-scipy-to-meson/>__.

    Authors

    • endolith (12)
    • h-vetinari (11)
    • Caio Agiani (2) +
    • Emmy Albert (1) +
    • Joseph Albert (1)
    • Tania Allard (3)
    • Carsten Allefeld (1) +
    • Kartik Anand (1) +
    • Virgile Andreani (2) +
    • Weh Andreas (1) +
    • Francesco Andreuzzi (5) +
    • Kian-Meng Ang (2) +
    • Gerrit Ansmann (1)
    • Ar-Kareem (1) +
    • Shehan Atukorala (1) +
    • avishai231 (1) +
    • Blair Azzopardi (1)
    • Sayantika Banik (2) +
    • Ross Barnowski (9)
    • Christoph Baumgarten (3)
    • Nickolai Belakovski (1)
    • Peter Bell (9)
    • Sebastian Berg (3)
    • Bharath (1) +
    • bobcatCA (2) +
    • boussoffara (2) +
    • Islem BOUZENIA (1) +
    • Jake Bowhay (41) +
    • Matthew Brett (11)
    • Dietrich Brunn (2) +
    • Michael Burkhart (2) +
    • Evgeni Burovski (96)
    • Matthias Bussonnier (20)
    • Dominic C (1)
    • Cameron (1) +
    • CJ Carey (3)
    • Thomas A Caswell (2)
    • Ali Cetin (2) +
    • Hood Chatham (5) +
    • Klesk Chonkin (1)
    • Craig Citro (1) +
    • Dan Cogswell (1) +
    • Luigi Cruz (1) +
    • Anirudh Dagar (5)
    • Brandon David (1)
    • deepakdinesh1123 (1) +
    • Denton DeLoss (1) +
    • derbuihan (2) +
    • Sameer Deshmukh (13) +
    • Niels Doucet (1) +
    • DWesl (8)
    • eytanadler (30) +
    • Thomas J. Fan (5)
    • Isuru Fernando (3)
    • Joseph Fox-Rabinovitz (1)
    • Ryan Gibson (4) +
    • Ralf Gommers (327)
    • Srinivas Gorur-Shandilya (1) +
    • Alex Griffing (2)
    • Matt Haberland (461)
    • Tristan Hearn (1) +
    • Jonathan Helgert (1) +
    • Samuel Hinton (1) +
    • Jake (1) +
    • Stewart Jamieson (1) +
    • Jan-Hendrik Müller (1)
    • Yikun Jiang (1) +
    • JuliaMelle01 (1) +
    • jyuv (12) +
    • Toshiki Kataoka (1)
    • Chris Keefe (1) +
    • Robert Kern (4)
    • Andrew Knyazev (11)
    • Matthias Koeppe (4) +
    • Sergey Koposov (1)
    • Volodymyr Kozachynskyi (1) +
    • Yotaro Kubo (2) +
    • Jacob Lapenna (1) +
    • Peter Mahler Larsen (8)
    • Eric Larson (4)
    • Laurynas Mikšys (1) +
    • Antony Lee (1)
    • Gregory R. Lee (2)
    • lerichi (1) +
    • Tim Leslie (2)
    • P. L. Lim (1)
    • Smit Lunagariya (43)
    • lutefiskhotdish (1) +
    • Cong Ma (12)
    • Syrtis Major (1)
    • Nicholas McKibben (18)
    • Melissa Weber Mendonça (10)
    • Mark Mikofski (1)
    • Jarrod Millman (13)
    • Harsh Mishra (6)
    • ML-Nielsen (3) +
    • Matthew Murray (1) +
    • Andrew Nelson (50)
    • Dimitri Papadopoulos Orfanos (1) +
    • Evgueni Ovtchinnikov (2) +
    • Sambit Panda (1)
    • Nick Papior (2)
    • Tirth Patel (43)
    • Petar Mlinarić (1)
    • petroselo (1) +
    • Ilhan Polat (64)
    • Anthony Polloreno (1)
    • Amit Portnoy (1) +
    • Quentin Barthélemy (9)
    • Patrick N. Raanes (1) +
    • Tyler Reddy (185)
    • Pamphile Roy (199)
    • Vivek Roy (2) +
    • sabonerune (1) +
    • Niyas Sait (2) +
    • Atsushi Sakai (25)
    • Mazen Sayed (1) +
    • Eduardo Schettino (5) +
    • Daniel Schmitz (6) +
    • Eli Schwartz (4) +
    • SELEE (2) +
    • Namami Shanker (4)
    • siddhantwahal (1) +
    • Gagandeep Singh (8)
    • Soph (1) +
    • Shivnaren Srinivasan (1) +
    • Scott Staniewicz (1) +
    • Leo C. Stein (4)
    • Albert Steppi (7)
    • Christopher Strickland (1) +
    • Kai Striega (4)
    • Søren Fuglede Jørgensen (1)
    • Aleksandr Tagilov (1) +
    • Masayuki Takagi (1) +
    • Sai Teja (1) +
    • Ewout ter Hoeven (2) +
    • Will Tirone (2)
    • Bas van Beek (7)
    • Dhruv Vats (1)
    • Arthur Volant (1)
    • Samuel Wallan (5)
    • Stefan van der Walt (8)
    • Warren Weckesser (84)
    • Anreas Weh (1)
    • Nils Werner (1)
    • Aviv Yaish (1) +
    • Dowon Yi (1)
    • Rory Yorke (1)
    • Yosshi999 (1) +
    • yuanx749 (2) +
    • Gang Zhao (23)
    • ZhihuiChen0903 (1)
    • Pavel Zun (1) +
    • David Zwicker (1) +

    A total of 154 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(389.25 KB)
    README.txt(100.52 KB)
    scipy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl(35.05 MB)
    scipy-1.9.0-cp310-cp310-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.72 MB)
    scipy-1.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.86 MB)
    scipy-1.9.0-cp310-cp310-win_amd64.whl(36.77 MB)
    scipy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl(34.87 MB)
    scipy-1.9.0-cp38-cp38-macosx_12_0_arm64.whl(28.39 MB)
    scipy-1.9.0-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.42 MB)
    scipy-1.9.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(36.00 MB)
    scipy-1.9.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.46 MB)
    scipy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.35 MB)
    scipy-1.9.0-cp38-cp38-win32.whl(32.93 MB)
    scipy-1.9.0-cp38-cp38-win_amd64.whl(36.78 MB)
    scipy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl(35.03 MB)
    scipy-1.9.0-cp39-cp39-macosx_12_0_arm64.whl(28.49 MB)
    scipy-1.9.0-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.69 MB)
    scipy-1.9.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(36.20 MB)
    scipy-1.9.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.85 MB)
    scipy-1.9.0-cp39-cp39-win32.whl(32.97 MB)
    scipy-1.9.0-cp39-cp39-win_amd64.whl(36.82 MB)
    scipy-1.9.0.tar.gz(40.07 MB)
  • v1.9.0rc3(Jul 23, 2022)

    SciPy 1.9.0 Release Notes

    Note: SciPy 1.9.0 is not released yet!

    SciPy 1.9.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.9.x branch, and on adding new features on the main branch.

    This release requires Python 3.8-3.11 and NumPy 1.18.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • We have modernized our build system to use meson, substantially improving our build performance, and providing better build-time configuration and cross-compilation support,
    • Added scipy.optimize.milp, new function for mixed-integer linear programming,
    • Added scipy.stats.fit for fitting discrete and continuous distributions to data,
    • Tensor-product spline interpolation modes were added to scipy.interpolate.RegularGridInterpolator,
    • A new global optimizer (DIviding RECTangles algorithm) scipy.optimize.direct.

    New features

    scipy.interpolate improvements

    • Speed up the RBFInterpolator evaluation with high dimensional interpolants.
    • Added new spline based interpolation methods for scipy.interpolate.RegularGridInterpolator and its tutorial.
    • scipy.interpolate.RegularGridInterpolator and scipy.interpolate.interpn now accept descending ordered points.
    • RegularGridInterpolator now handles length-1 grid axes.
    • The BivariateSpline subclasses have a new method partial_derivative which constructs a new spline object representing a derivative of an original spline. This mirrors the corresponding functionality for univariate splines, splder and BSpline.derivative, and can substantially speed up repeated evaluation of derivatives.

    scipy.linalg improvements

    • scipy.linalg.expm now accepts nD arrays. Its speed is also improved.
    • Minimum required LAPACK version is bumped to 3.7.1.

    scipy.fft improvements

    • Added uarray multimethods for scipy.fft.fht and scipy.fft.ifht to allow provision of third party backend implementations such as those recently added to CuPy.

    scipy.optimize improvements

    • A new global optimizer, scipy.optimize.direct (DIviding RECTangles algorithm) was added. For problems with inexpensive function evaluations, like the ones in the SciPy benchmark suite, direct is competitive with the best other solvers in SciPy (dual_annealing and differential_evolution) in terms of execution time. See gh-14300 <https://github.com/scipy/scipy/pull/14300>__ for more details.

    • Add a full_output parameter to scipy.optimize.curve_fit to output additional solution information.

    • Add a integrality parameter to scipy.optimize.differential_evolution, enabling integer constraints on parameters.

    • Add a vectorized parameter to call a vectorized objective function only once per iteration. This can improve minimization speed by reducing interpreter overhead from the multiple objective function calls.

    • The default method of scipy.optimize.linprog is now 'highs'.

    • Added scipy.optimize.milp, new function for mixed-integer linear programming.

    • Added Newton-TFQMR method to newton_krylov.

    • Added support for the Bounds class in shgo and dual_annealing for a more uniform API across scipy.optimize.

    • Added the vectorized keyword to differential_evolution.

    • approx_fprime now works with vector-valued functions.

    scipy.signal improvements

    • The new window function scipy.signal.windows.kaiser_bessel_derived was added to compute the Kaiser-Bessel derived window.
    • Single-precision hilbert operations are now faster as a result of more consistent dtype handling.

    scipy.sparse improvements

    • Add a copy parameter to scipy.sparce.csgraph.laplacian. Using inplace computation with copy=False reduces the memory footprint.
    • Add a dtype parameter to scipy.sparce.csgraph.laplacian for type casting.
    • Add a symmetrized parameter to scipy.sparce.csgraph.laplacian to produce symmetric Laplacian for directed graphs.
    • Add a form parameter to scipy.sparce.csgraph.laplacian taking one of the three values: array, or function, or lo determining the format of the output Laplacian:
      • array is a numpy array (backward compatible default);
      • function is a pointer to a lambda-function evaluating the Laplacian-vector or Laplacian-matrix product;
      • lo results in the format of the LinearOperator.

    scipy.sparse.linalg improvements

    • lobpcg performance improvements for small input cases.

    scipy.spatial improvements

    • Add an order parameter to scipy.spatial.transform.Rotation.from_quat and scipy.spatial.transform.Rotation.as_quat to specify quaternion format.

    scipy.stats improvements

    • scipy.stats.monte_carlo_test performs one-sample Monte Carlo hypothesis tests to assess whether a sample was drawn from a given distribution. Besides reproducing the results of hypothesis tests like scipy.stats.ks_1samp, scipy.stats.normaltest, and scipy.stats.cramervonmises without small sample size limitations, it makes it possible to perform similar tests using arbitrary statistics and distributions.

    • Several scipy.stats functions support new axis (integer or tuple of integers) and nan_policy ('raise', 'omit', or 'propagate'), and keepdims arguments. These functions also support masked arrays as inputs, even if they do not have a scipy.stats.mstats counterpart. Edge cases for multidimensional arrays, such as when axis-slices have no unmasked elements or entire inputs are of size zero, are handled consistently.

    • Add a weight parameter to scipy.stats.hmean.

    • Several improvements have been made to scipy.stats.levy_stable. Substantial improvement has been made for numerical evaluation of the pdf and cdf, resolving #12658 and #14944. The improvement is particularly dramatic for stability parameter alpha close to or equal to 1 and for alpha below but approaching its maximum value of 2. The alternative fast Fourier transform based method for pdf calculation has also been updated to use the approach of Wang and Zhang from their 2008 conference paper Simpson’s rule based FFT method to compute densities of stable distribution, making this method more competitive with the default method. In addition, users now have the option to change the parametrization of the Levy Stable distribution to Nolan's "S0" parametrization which is used internally by SciPy's pdf and cdf implementations. The "S0" parametrization is described in Nolan's paper Numerical calculation of stable densities and distribution functions upon which SciPy's implementation is based. "S0" has the advantage that delta and gamma are proper location and scale parameters. With delta and gamma fixed, the location and scale of the resulting distribution remain unchanged as alpha and beta change. This is not the case for the default "S1" parametrization. Finally, more options have been exposed to allow users to trade off between runtime and accuracy for both the default and FFT methods of pdf and cdf calculation. More information can be found in the documentation here (to be linked).

    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.

    • The methods "pearson" and "tippet" from scipy.stats.combine_pvalues have been fixed to return the correct p-values, resolving #15373. In addition, the documentation for scipy.stats.combine_pvalues has been expanded and improved.

    • Unlike other reduction functions, stats.mode didn't consume the axis being operated on and failed for negative axis inputs. Both the bugs have been fixed. Note that stats.mode will now consume the input axis and return an ndarray with the axis dimension removed.

    • Replaced implementation of scipy.stats.ncf with the implementation from Boost for improved reliability.

    • Add a bits parameter to scipy.stats.qmc.Sobol. It allows to use from 0 to 64 bits to compute the sequence. Default is None which corresponds to 30 for backward compatibility. Using a higher value allow to sample more points. Note: bits does not affect the output dtype.

    • Add a integers method to scipy.stats.qmc.QMCEngine. It allows sampling integers using any QMC sampler.

    • Improved the fit speed and accuracy of stats.pareto.

    • Added qrvs method to NumericalInversePolynomial to match the situation for NumericalInverseHermite.

    • Faster random variate generation for gennorm and nakagami.

    • lloyd_centroidal_voronoi_tessellation has been added to allow improved sample distributions via iterative application of Voronoi diagrams and centering operations

    • Add scipy.stats.qmc.PoissonDisk to sample using the Poisson disk sampling method. It guarantees that samples are separated from each other by a given radius.

    • Add scipy.stats.pmean to calculate the weighted power mean also called generalized mean.

    Deprecated features

    • Due to collision with the shape parameter n of several distributions, use of the distribution moment method with keyword argument n is deprecated. Keyword n is replaced with keyword order.
    • Similarly, use of the distribution interval method with keyword arguments alpha is deprecated. Keyword alpha is replaced with keyword confidence.
    • The 'simplex', 'revised simplex', and 'interior-point' methods of scipy.optimize.linprog are deprecated. Methods highs, highs-ds, or highs-ipm should be used in new code.
    • Support for non-numeric arrays has been deprecated from stats.mode. pandas.DataFrame.mode can be used instead.
    • The function spatial.distance.kulsinski has been deprecated in favor of spatial.distance.kulczynski1.
    • The maxiter keyword of the truncated Newton (TNC) algorithm has been deprecated in favour of maxfun.
    • The vertices keyword of Delauney.qhull now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.
    • The extradoc keyword of rv_continuous, rv_discrete and rv_sample now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.

    Expired Deprecations

    There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:

    • Object arrays in sparse matrices now raise an error.
    • Inexact indices into sparse matrices now raise an error.
    • Passing radius=None to scipy.spatial.SphericalVoronoi now raises an error (not adding radius defaults to 1, as before).
    • Several BSpline methods now raise an error if inputs have ndim > 1.
    • The _rvs method of statistical distributions now requires a size parameter.
    • Passing a fillvalue that cannot be cast to the output type in scipy.signal.convolve2d now raises an error.
    • scipy.spatial.distance now enforces that the input vectors are one-dimensional.
    • Removed stats.itemfreq.
    • Removed stats.median_absolute_deviation.
    • Removed n_jobs keyword argument and use of k=None from kdtree.query.
    • Removed right keyword from interpolate.PPoly.extend.
    • Removed debug keyword from scipy.linalg.solve_*.
    • Removed class _ppform scipy.interpolate.
    • Removed BSR methods matvec and matmat.
    • Removed mlab truncation mode from cluster.dendrogram.
    • Removed cluster.vq.py_vq2.
    • Removed keyword arguments ftol and xtol from optimize.minimize(method='Nelder-Mead').
    • Removed signal.windows.hanning.
    • Removed LAPACK gegv functions from linalg; this raises the minimally required LAPACK version to 3.7.1.
    • Removed spatial.distance.matching.
    • Removed the alias scipy.random for numpy.random.
    • Removed docstring related functions from scipy.misc (docformat, inherit_docstring_from, extend_notes_in_docstring, replace_notes_in_docstring, indentcount_lines, filldoc, unindent_dict, unindent_string).
    • Removed linalg.pinv2.

    Backwards incompatible changes

    • Several scipy.stats functions now convert np.matrix to np.ndarrays before the calculation is performed. In this case, the output will be a scalar or np.ndarray of appropriate shape rather than a 2D np.matrix. Similarly, while masked elements of masked arrays are still ignored, the output will be a scalar or np.ndarray rather than a masked array with mask=False.
    • The default method of scipy.optimize.linprog is now 'highs', not 'interior-point' (which is now deprecated), so callback functions and some options are no longer supported with the default method. With the default method, the x attribute of the returned OptimizeResult is now None (instead of a non-optimal array) when an optimal solution cannot be found (e.g. infeasible problem).
    • For scipy.stats.combine_pvalues, the sign of the test statistic returned for the method "pearson" has been flipped so that higher values of the statistic now correspond to lower p-values, making the statistic more consistent with those of the other methods and with the majority of the literature.
    • scipy.linalg.expm due to historical reasons was using the sparse implementation and thus was accepting sparse arrays. Now it only works with nDarrays. For sparse usage, scipy.sparse.linalg.expm needs to be used explicitly.
    • The definition of scipy.stats.circvar has reverted to the one that is standard in the literature; note that this is not the same as the square of scipy.stats.circstd.
    • Remove inheritance to QMCEngine in MultinomialQMC and MultivariateNormalQMC. It removes the methods fast_forward and reset.
    • Init of MultinomialQMC now require the number of trials with n_trials. Hence, MultinomialQMC.random output has now the correct shape (n, pvals).
    • Several function-specific warnings (F_onewayConstantInputWarning, F_onewayBadInputSizesWarning, PearsonRConstantInputWarning, PearsonRNearConstantInputWarning, SpearmanRConstantInputWarning, and BootstrapDegenerateDistributionWarning) have been replaced with more general warnings.

    Other changes

    • A draft developer CLI is available for SciPy, leveraging the doit, click and rich-click tools. For more details, see gh-15959.

    • The SciPy contributor guide has been reorganized and updated (see #15947 for details).

    • QUADPACK Fortran routines in scipy.integrate, which power scipy.integrate.quad, have been marked as recursive. This should fix rare issues in multivariate integration (nquad and friends) and obviate the need for compiler-specific compile flags (/recursive for ifort etc). Please file an issue if this change turns out problematic for you. This is also true for FITPACK routines in scipy.interpolate, which power splrep, splev etc., and *UnivariateSpline and *BivariateSpline classes.

    • the USE_PROPACK environment variable has been renamed to SCIPY_USE_PROPACK; setting to a non-zero value will enable the usage of the PROPACK library as before

    • Building SciPy on windows with MSVC now requires at least the vc142 toolset (available in Visual Studio 2019 and higher).

    Lazy access to subpackages

    Before this release, all subpackages of SciPy (cluster, fft, ndimage, etc.) had to be explicitly imported. Now, these subpackages are lazily loaded as soon as they are accessed, so that the following is possible (if desired for interactive use, it's not actually recommended for code, see :ref:scipy-api): import scipy as sp; sp.fft.dct([1, 2, 3]). Advantages include: making it easier to navigate SciPy in interactive terminals, reducing subpackage import conflicts (which before required import networkx.linalg as nla; import scipy.linalg as sla), and avoiding repeatedly having to update imports during teaching & experimentation. Also see the related community specification document.

    SciPy switched to Meson as its build system

    This is the first release that ships with Meson as the build system. When installing with pip or pypa/build, Meson will be used (invoked via the meson-python build hook). This change brings significant benefits - most importantly much faster build times, but also better support for cross-compilation and cleaner build logs.

    Note:

    This release still ships with support for numpy.distutils-based builds as well. Those can be invoked through the setup.py command-line interface (e.g., python setup.py install). It is planned to remove numpy.distutils support before the 1.10.0 release.

    When building from source, a number of things have changed compared to building with numpy.distutils:

    • New build dependencies: meson, ninja, and pkg-config. setuptools and wheel are no longer needed.
    • BLAS and LAPACK libraries that are supported haven't changed, however the discovery mechanism has: that is now using pkg-config instead of hardcoded paths or a site.cfg file.
    • The build defaults to using OpenBLAS. See :ref:blas-lapack-selection for details.

    The two CLIs that can be used to build wheels are pip and build. In addition, the SciPy repo contains a python dev.py CLI for any kind of development task (see its --help for details). For a comparison between old (distutils) and new (meson) build commands, see :ref:meson-faq.

    For more information on the introduction of Meson support in SciPy, see gh-13615 <https://github.com/scipy/scipy/issues/13615>__ and this blog post <https://labs.quansight.org/blog/2021/07/moving-scipy-to-meson/>__.

    Authors

    • endolith (12)
    • Caio Agiani (2) +
    • Emmy Albert (1) +
    • Joseph Albert (1)
    • Tania Allard (3)
    • Carsten Allefeld (1) +
    • Kartik Anand (1) +
    • Virgile Andreani (2) +
    • Weh Andreas (1) +
    • Francesco Andreuzzi (5) +
    • Kian-Meng Ang (2) +
    • Gerrit Ansmann (1)
    • Ar-Kareem (1) +
    • Shehan Atukorala (1) +
    • avishai231 (1) +
    • Blair Azzopardi (1)
    • Sayantika Banik (2) +
    • Ross Barnowski (9)
    • Christoph Baumgarten (3)
    • Nickolai Belakovski (1)
    • Peter Bell (9)
    • Sebastian Berg (3)
    • Bharath (1) +
    • bobcatCA (2) +
    • boussoffara (2) +
    • Islem BOUZENIA (1) +
    • Jake Bowhay (41) +
    • Matthew Brett (11)
    • Dietrich Brunn (2) +
    • Michael Burkhart (2) +
    • Evgeni Burovski (96)
    • Matthias Bussonnier (20)
    • Dominic C (1)
    • Cameron (1) +
    • CJ Carey (3)
    • Thomas A Caswell (2)
    • Ali Cetin (2) +
    • Hood Chatham (5) +
    • Klesk Chonkin (1)
    • Craig Citro (1) +
    • Dan Cogswell (1) +
    • Luigi Cruz (1) +
    • Anirudh Dagar (5)
    • Brandon David (1)
    • deepakdinesh1123 (1) +
    • Denton DeLoss (1) +
    • derbuihan (2) +
    • Sameer Deshmukh (13) +
    • Niels Doucet (1) +
    • DWesl (8)
    • eytanadler (30) +
    • Thomas J. Fan (5)
    • Isuru Fernando (3)
    • Joseph Fox-Rabinovitz (1)
    • Ryan Gibson (4) +
    • Ralf Gommers (323)
    • Srinivas Gorur-Shandilya (1) +
    • Alex Griffing (2)
    • h-vetinari (5)
    • Matt Haberland (459)
    • Tristan Hearn (1) +
    • Jonathan Helgert (1) +
    • Samuel Hinton (1) +
    • Jake (1) +
    • Stewart Jamieson (1) +
    • Jan-Hendrik Müller (1)
    • Yikun Jiang (1) +
    • JuliaMelle01 (1) +
    • jyuv (12) +
    • Toshiki Kataoka (1)
    • Chris Keefe (1) +
    • Robert Kern (4)
    • Andrew Knyazev (11)
    • Matthias Koeppe (4) +
    • Sergey Koposov (1)
    • Volodymyr Kozachynskyi (1) +
    • Yotaro Kubo (2) +
    • Jacob Lapenna (1) +
    • Peter Mahler Larsen (8)
    • Eric Larson (4)
    • Laurynas Mikšys (1) +
    • Antony Lee (1)
    • Gregory R. Lee (2)
    • lerichi (1) +
    • Tim Leslie (2)
    • P. L. Lim (1)
    • Smit Lunagariya (43)
    • lutefiskhotdish (1) +
    • Cong Ma (12)
    • Syrtis Major (1)
    • Nicholas McKibben (18)
    • Melissa Weber Mendonça (10)
    • Mark Mikofski (1)
    • Jarrod Millman (13)
    • Harsh Mishra (6)
    • ML-Nielsen (3) +
    • Matthew Murray (1) +
    • Andrew Nelson (50)
    • Dimitri Papadopoulos Orfanos (1) +
    • Evgueni Ovtchinnikov (2) +
    • Sambit Panda (1)
    • Nick Papior (2)
    • Tirth Patel (43)
    • Petar Mlinarić (1)
    • petroselo (1) +
    • Ilhan Polat (64)
    • Anthony Polloreno (1)
    • Amit Portnoy (1) +
    • Quentin Barthélemy (9)
    • Patrick N. Raanes (1) +
    • Tyler Reddy (174)
    • Pamphile Roy (197)
    • Vivek Roy (2) +
    • sabonerune (1) +
    • Niyas Sait (2) +
    • Atsushi Sakai (25)
    • Mazen Sayed (1) +
    • Eduardo Schettino (5) +
    • Daniel Schmitz (6) +
    • Eli Schwartz (4) +
    • SELEE (2) +
    • Namami Shanker (4)
    • siddhantwahal (1) +
    • Gagandeep Singh (8)
    • Soph (1) +
    • Shivnaren Srinivasan (1) +
    • Scott Staniewicz (1) +
    • Leo C. Stein (4)
    • Albert Steppi (7)
    • Christopher Strickland (1) +
    • Kai Striega (4)
    • Søren Fuglede Jørgensen (1)
    • Aleksandr Tagilov (1) +
    • Masayuki Takagi (1) +
    • Sai Teja (1) +
    • Ewout ter Hoeven (2) +
    • Will Tirone (2)
    • Bas van Beek (7)
    • Dhruv Vats (1)
    • H. Vetinari (6)
    • Arthur Volant (1)
    • Samuel Wallan (5)
    • Stefan van der Walt (8)
    • Warren Weckesser (83)
    • Anreas Weh (1)
    • Nils Werner (1)
    • Aviv Yaish (1) +
    • Dowon Yi (1)
    • Rory Yorke (1)
    • Yosshi999 (1) +
    • yuanx749 (2) +
    • Gang Zhao (23)
    • ZhihuiChen0903 (1)
    • Pavel Zun (1) +
    • David Zwicker (1) +

    A total of 155 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(387.02 KB)
    README.txt(99.88 KB)
    scipy-1.9.0rc3-cp310-cp310-macosx_10_9_x86_64.whl(35.06 MB)
    scipy-1.9.0rc3-cp310-cp310-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc3-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.73 MB)
    scipy-1.9.0rc3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.29 MB)
    scipy-1.9.0rc3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.86 MB)
    scipy-1.9.0rc3-cp310-cp310-win_amd64.whl(36.77 MB)
    scipy-1.9.0rc3-cp38-cp38-macosx_10_9_x86_64.whl(34.87 MB)
    scipy-1.9.0rc3-cp38-cp38-macosx_12_0_arm64.whl(28.39 MB)
    scipy-1.9.0rc3-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.43 MB)
    scipy-1.9.0rc3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(36.02 MB)
    scipy-1.9.0rc3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.47 MB)
    scipy-1.9.0rc3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.35 MB)
    scipy-1.9.0rc3-cp38-cp38-win32.whl(32.93 MB)
    scipy-1.9.0rc3-cp38-cp38-win_amd64.whl(36.78 MB)
    scipy-1.9.0rc3-cp39-cp39-macosx_10_9_x86_64.whl(35.03 MB)
    scipy-1.9.0rc3-cp39-cp39-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc3-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.70 MB)
    scipy-1.9.0rc3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(36.21 MB)
    scipy-1.9.0rc3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.0rc3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.85 MB)
    scipy-1.9.0rc3-cp39-cp39-win32.whl(32.97 MB)
    scipy-1.9.0rc3-cp39-cp39-win_amd64.whl(36.82 MB)
    scipy-1.9.0rc3.tar.gz(40.07 MB)
  • v1.9.0rc2(Jul 5, 2022)

    SciPy 1.9.0 Release Notes

    Note: SciPy 1.9.0 is not released yet!

    SciPy 1.9.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.9.x branch, and on adding new features on the main branch.

    This release requires Python 3.8+ and NumPy 1.18.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • We have modernized our build system to use meson, substantially reducing our source build times
    • Added scipy.optimize.milp, new function for mixed-integer linear programming.
    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.
    • Tensor-product spline interpolation modes were added to scipy.interpolate.RegularGridInterpolator.
    • A new global optimizer (DIviding RECTangles algorithm) scipy.optimize.direct

    New features

    scipy.interpolate improvements

    • Speed up the RBFInterpolator evaluation with high dimensional interpolants.
    • Added new spline based interpolation methods for scipy.interpolate.RegularGridInterpolator and its tutorial.
    • scipy.interpolate.RegularGridInterpolator and scipy.interpolate.interpn now accept descending ordered points.
    • RegularGridInterpolator now handles length-1 grid axes.
    • The BivariateSpline subclasses have a new method partial_derivative which constructs a new spline object representing a derivative of an original spline. This mirrors the corresponding functionality for univariate splines, splder and BSpline.derivative, and can substantially speed up repeated evaluation of derivatives.

    scipy.linalg improvements

    • scipy.linalg.expm now accepts nD arrays. Its speed is also improved.
    • Minimum required LAPACK version is bumped to 3.7.1.

    scipy.fft improvements

    • Added uarray multimethods for scipy.fft.fht and scipy.fft.ifht to allow provision of third party backend implementations such as those recently added to CuPy.

    scipy.optimize improvements

    • A new global optimizer, scipy.optimize.direct (DIviding RECTangles algorithm) was added. For problems with inexpensive function evaluations, like the ones in the SciPy benchmark suite, direct is competitive with the best other solvers in SciPy (dual_annealing and differential_evolution) in terms of execution time. See gh-14300 <https://github.com/scipy/scipy/pull/14300>__ for more details.

    • Add a full_output parameter to scipy.optimize.curve_fit to output additional solution information.

    • Add a integrality parameter to scipy.optimize.differential_evolution, enabling integer constraints on parameters.

    • Add a vectorized parameter to call a vectorized objective function only once per iteration. This can improve minimization speed by reducing interpreter overhead from the multiple objective function calls.

    • The default method of scipy.optimize.linprog is now 'highs'.

    • Added scipy.optimize.milp, new function for mixed-integer linear programming.

    • Added Newton-TFQMR method to newton_krylov.

    • Added support for the Bounds class in shgo and dual_annealing for a more uniform API across scipy.optimize.

    • Added the vectorized keyword to differential_evolution.

    • approx_fprime now works with vector-valued functions.

    scipy.signal improvements

    • The new window function scipy.signal.windows.kaiser_bessel_derived was added to compute the Kaiser-Bessel derived window.
    • Single-precision hilbert operations are now faster as a result of more consistent dtype handling.

    scipy.sparse improvements

    • Add a copy parameter to scipy.sparce.csgraph.laplacian. Using inplace computation with copy=False reduces the memory footprint.
    • Add a dtype parameter to scipy.sparce.csgraph.laplacian for type casting.
    • Add a symmetrized parameter to scipy.sparce.csgraph.laplacian to produce symmetric Laplacian for directed graphs.
    • Add a form parameter to scipy.sparce.csgraph.laplacian taking one of the three values: array, or function, or lo determining the format of the output Laplacian:
      • array is a numpy array (backward compatible default);
      • function is a pointer to a lambda-function evaluating the Laplacian-vector or Laplacian-matrix product;
      • lo results in the format of the LinearOperator.

    scipy.sparse.linalg improvements

    • lobpcg performance improvements for small input cases.

    scipy.spatial improvements

    • Add an order parameter to scipy.spatial.transform.Rotation.from_quat and scipy.spatial.transform.Rotation.as_quat to specify quaternion format.

    scipy.stats improvements

    • scipy.stats.monte_carlo_test performs one-sample Monte Carlo hypothesis tests to assess whether a sample was drawn from a given distribution. Besides reproducing the results of hypothesis tests like scipy.stats.ks_1samp, scipy.stats.normaltest, and scipy.stats.cramervonmises without small sample size limitations, it makes it possible to perform similar tests using arbitrary statistics and distributions.

    • Several scipy.stats functions support new axis (integer or tuple of integers) and nan_policy ('raise', 'omit', or 'propagate'), and keepdims arguments. These functions also support masked arrays as inputs, even if they do not have a scipy.stats.mstats counterpart. Edge cases for multidimensional arrays, such as when axis-slices have no unmasked elements or entire inputs are of size zero, are handled consistently.

    • Add a weight parameter to scipy.stats.hmean.

    • Several improvements have been made to scipy.stats.levy_stable. Substantial improvement has been made for numerical evaluation of the pdf and cdf, resolving #12658 and #14944. The improvement is particularly dramatic for stability parameter alpha close to or equal to 1 and for alpha below but approaching its maximum value of 2. The alternative fast Fourier transform based method for pdf calculation has also been updated to use the approach of Wang and Zhang from their 2008 conference paper Simpson’s rule based FFT method to compute densities of stable distribution, making this method more competitive with the default method. In addition, users now have the option to change the parametrization of the Levy Stable distribution to Nolan's "S0" parametrization which is used internally by SciPy's pdf and cdf implementations. The "S0" parametrization is described in Nolan's paper Numerical calculation of stable densities and distribution functions upon which SciPy's implementation is based. "S0" has the advantage that delta and gamma are proper location and scale parameters. With delta and gamma fixed, the location and scale of the resulting distribution remain unchanged as alpha and beta change. This is not the case for the default "S1" parametrization. Finally, more options have been exposed to allow users to trade off between runtime and accuracy for both the default and FFT methods of pdf and cdf calculation. More information can be found in the documentation here (to be linked).

    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.

    • The methods "pearson" and "tippet" from scipy.stats.combine_pvalues have been fixed to return the correct p-values, resolving #15373. In addition, the documentation for scipy.stats.combine_pvalues has been expanded and improved.

    • Unlike other reduction functions, stats.mode didn't consume the axis being operated on and failed for negative axis inputs. Both the bugs have been fixed. Note that stats.mode will now consume the input axis and return an ndarray with the axis dimension removed.

    • Replaced implementation of scipy.stats.ncf with the implementation from Boost for improved reliability.

    • Add a bits parameter to scipy.stats.qmc.Sobol. It allows to use from 0 to 64 bits to compute the sequence. Default is None which corresponds to 30 for backward compatibility. Using a higher value allow to sample more points. Note: bits does not affect the output dtype.

    • Add a integers method to scipy.stats.qmc.QMCEngine. It allows sampling integers using any QMC sampler.

    • Improved the fit speed and accuracy of stats.pareto.

    • Added qrvs method to NumericalInversePolynomial to match the situation for NumericalInverseHermite.

    • Faster random variate generation for gennorm and nakagami.

    • lloyd_centroidal_voronoi_tessellation has been added to allow improved sample distributions via iterative application of Voronoi diagrams and centering operations

    • Add scipy.stats.qmc.PoissonDisk to sample using the Poisson disk sampling method. It guarantees that samples are separated from each other by a given radius.

    • Add scipy.stats.pmean to calculate the weighted power mean also called generalized mean.

    Deprecated features

    • Due to collision with the shape parameter n of several distributions, use of the distribution moment method with keyword argument n is deprecated. Keyword n is replaced with keyword order.
    • Similarly, use of the distribution interval method with keyword arguments alpha is deprecated. Keyword alpha is replaced with keyword confidence.
    • The 'simplex', 'revised simplex', and 'interior-point' methods of scipy.optimize.linprog are deprecated. Methods highs, highs-ds, or highs-ipm should be used in new code.
    • Support for non-numeric arrays has been deprecated from stats.mode. pandas.DataFrame.mode can be used instead.
    • The function spatial.distance.kulsinski has been deprecated in favor of spatial.distance.kulczynski1.
    • The maxiter keyword of the truncated Newton (TNC) algorithm has been deprecated in favour of maxfun.
    • The vertices keyword of Delauney.qhull now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.
    • The extradoc keyword of rv_continuous, rv_discrete and rv_sample now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.

    Expired Deprecations

    There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:

    • Object arrays in sparse matrices now raise an error.
    • Inexact indices into sparse matrices now raise an error.
    • Passing radius=None to scipy.spatial.SphericalVoronoi now raises an error (not adding radius defaults to 1, as before).
    • Several BSpline methods now raise an error if inputs have ndim > 1.
    • The _rvs method of statistical distributions now requires a size parameter.
    • Passing a fillvalue that cannot be cast to the output type in scipy.signal.convolve2d now raises an error.
    • scipy.spatial.distance now enforces that the input vectors are one-dimensional.
    • Removed stats.itemfreq.
    • Removed stats.median_absolute_deviation.
    • Removed n_jobs keyword argument and use of k=None from kdtree.query.
    • Removed right keyword from interpolate.PPoly.extend.
    • Removed debug keyword from scipy.linalg.solve_*.
    • Removed class _ppform scipy.interpolate.
    • Removed BSR methods matvec and matmat.
    • Removed mlab truncation mode from cluster.dendrogram.
    • Removed cluster.vq.py_vq2.
    • Removed keyword arguments ftol and xtol from optimize.minimize(method='Nelder-Mead').
    • Removed signal.windows.hanning.
    • Removed LAPACK gegv functions from linalg; this raises the minimally required LAPACK version to 3.7.1.
    • Removed spatial.distance.matching.
    • Removed the alias scipy.random for numpy.random.
    • Removed docstring related functions from scipy.misc (docformat, inherit_docstring_from, extend_notes_in_docstring, replace_notes_in_docstring, indentcount_lines, filldoc, unindent_dict, unindent_string).
    • Removed linalg.pinv2.

    Backwards incompatible changes

    • Several scipy.stats functions now convert np.matrix to np.ndarrays before the calculation is performed. In this case, the output will be a scalar or np.ndarray of appropriate shape rather than a 2D np.matrix. Similarly, while masked elements of masked arrays are still ignored, the output will be a scalar or np.ndarray rather than a masked array with mask=False.
    • The default method of scipy.optimize.linprog is now 'highs', not 'interior-point' (which is now deprecated), so callback functions and some options are no longer supported with the default method. With the default method, the x attribute of the returned OptimizeResult is now None (instead of a non-optimal array) when an optimal solution cannot be found (e.g. infeasible problem).
    • For scipy.stats.combine_pvalues, the sign of the test statistic returned for the method "pearson" has been flipped so that higher values of the statistic now correspond to lower p-values, making the statistic more consistent with those of the other methods and with the majority of the literature.
    • scipy.linalg.expm due to historical reasons was using the sparse implementation and thus was accepting sparse arrays. Now it only works with nDarrays. For sparse usage, scipy.sparse.linalg.expm needs to be used explicitly.
    • The definition of scipy.stats.circvar has reverted to the one that is standard in the literature; note that this is not the same as the square of scipy.stats.circstd.
    • Remove inheritance to QMCEngine in MultinomialQMC and MultivariateNormalQMC. It removes the methods fast_forward and reset.
    • Init of MultinomialQMC now require the number of trials with n_trials. Hence, MultinomialQMC.random output has now the correct shape (n, pvals).
    • Several function-specific warnings (F_onewayConstantInputWarning, F_onewayBadInputSizesWarning, PearsonRConstantInputWarning, PearsonRNearConstantInputWarning, SpearmanRConstantInputWarning, and BootstrapDegenerateDistributionWarning) have been replaced with more general warnings.

    Other changes

    • A draft developer CLI is available for SciPy, leveraging the doit, click and rich-click tools. For more details, see gh-15959.

    • The SciPy contributor guide has been reorganized and updated (see #15947 for details).

    • QUADPACK Fortran routines in scipy.integrate, which power scipy.integrate.quad, have been marked as recursive. This should fix rare issues in multivariate integration (nquad and friends) and obviate the need for compiler-specific compile flags (/recursive for ifort etc). Please file an issue if this change turns out problematic for you. This is also true for FITPACK routines in scipy.interpolate, which power splrep, splev etc., and *UnivariateSpline and *BivariateSpline classes.

    • the USE_PROPACK environment variable has been renamed to SCIPY_USE_PROPACK; setting to a non-zero value will enable the usage of the PROPACK library as before

    Lazy access to subpackages

    Before this release, all subpackages of SciPy (cluster, fft, ndimage, etc.) had to be explicitly imported. Now, these subpackages are lazily loaded as soon as they are accessed, so that the following is possible (if desired for interactive use, it's not actually recommended for code, see :ref:scipy-api): import scipy as sp; sp.fft.dct([1, 2, 3]). Advantages include: making it easier to navigate SciPy in interactive terminals, reducing subpackage import conflicts (which before required import networkx.linalg as nla; import scipy.linalg as sla), and avoiding repeatedly having to update imports during teaching & experimentation. Also see the related community specification document.

    SciPy switched to Meson as its build system

    This is the first release that ships with Meson as the build system. When installing with pip or pypa/build, Meson will be used (invoked via the meson-python build hook). This change brings significant benefits - most importantly much faster build times, but also better support for cross-compilation and cleaner build logs.

    Note:

    This release still ships with support for numpy.distutils-based builds as well. Those can be invoked through the setup.py command-line interface (e.g., python setup.py install). It is planned to remove numpy.distutils support before the 1.10.0 release.

    When building from source, a number of things have changed compared to building with numpy.distutils:

    • New build dependencies: meson, ninja, and pkg-config. setuptools and wheel are no longer needed.
    • BLAS and LAPACK libraries that are supported haven't changed, however the discovery mechanism has: that is now using pkg-config instead of hardcoded paths or a site.cfg file.
    • The build defaults to using OpenBLAS. See :ref:blas-lapack-selection for details.

    The two CLIs that can be used to build wheels are pip and build. In addition, the SciPy repo contains a python dev.py CLI for any kind of development task (see its --help for details). For a comparison between old (distutils) and new (meson) build commands, see :ref:meson-faq.

    For more information on the introduction of Meson support in SciPy, see gh-13615 <https://github.com/scipy/scipy/issues/13615>__ and this blog post <https://labs.quansight.org/blog/2021/07/moving-scipy-to-meson/>__.

    Authors

    • endolith (12)
    • Caio Agiani (2) +
    • Emmy Albert (1) +
    • Joseph Albert (1)
    • Tania Allard (3)
    • Carsten Allefeld (1) +
    • Kartik Anand (1) +
    • Virgile Andreani (2) +
    • Weh Andreas (1) +
    • Francesco Andreuzzi (5) +
    • Kian-Meng Ang (2) +
    • Gerrit Ansmann (1)
    • Ar-Kareem (1) +
    • Shehan Atukorala (1) +
    • avishai231 (1) +
    • Blair Azzopardi (1)
    • Sayantika Banik (2) +
    • Ross Barnowski (9)
    • Christoph Baumgarten (3)
    • Nickolai Belakovski (1)
    • Peter Bell (9)
    • Sebastian Berg (3)
    • Bharath (1) +
    • bobcatCA (2) +
    • boussoffara (2) +
    • Islem BOUZENIA (1) +
    • Jake Bowhay (41) +
    • Matthew Brett (11)
    • Dietrich Brunn (2) +
    • Michael Burkhart (2) +
    • Evgeni Burovski (96)
    • Matthias Bussonnier (20)
    • Dominic C (1)
    • Cameron (1) +
    • CJ Carey (3)
    • Thomas A Caswell (2)
    • Ali Cetin (2) +
    • Hood Chatham (5) +
    • Klesk Chonkin (1)
    • Craig Citro (1) +
    • Dan Cogswell (1) +
    • Luigi Cruz (1) +
    • Anirudh Dagar (5)
    • Brandon David (1)
    • deepakdinesh1123 (1) +
    • Denton DeLoss (1) +
    • derbuihan (2) +
    • Sameer Deshmukh (13) +
    • Niels Doucet (1) +
    • DWesl (8)
    • eytanadler (30) +
    • Thomas J. Fan (5)
    • Isuru Fernando (3)
    • Joseph Fox-Rabinovitz (1)
    • Ryan Gibson (4) +
    • Ralf Gommers (314)
    • Srinivas Gorur-Shandilya (1) +
    • Alex Griffing (2)
    • h-vetinari (3)
    • Matt Haberland (446)
    • Tristan Hearn (1) +
    • Jonathan Helgert (1) +
    • Samuel Hinton (1) +
    • Jake (1) +
    • Stewart Jamieson (1) +
    • Jan-Hendrik Müller (1)
    • Yikun Jiang (1) +
    • JuliaMelle01 (1) +
    • jyuv (12) +
    • Toshiki Kataoka (1)
    • Chris Keefe (1) +
    • Robert Kern (4)
    • Andrew Knyazev (11)
    • Matthias Koeppe (4) +
    • Sergey Koposov (1)
    • Volodymyr Kozachynskyi (1) +
    • Yotaro Kubo (2) +
    • Jacob Lapenna (1) +
    • Peter Mahler Larsen (8)
    • Eric Larson (4)
    • Laurynas Mikšys (1) +
    • Antony Lee (1)
    • Gregory R. Lee (2)
    • lerichi (1) +
    • Tim Leslie (2)
    • P. L. Lim (1)
    • Smit Lunagariya (43)
    • lutefiskhotdish (1) +
    • Cong Ma (12)
    • Syrtis Major (1)
    • Nicholas McKibben (17)
    • Melissa Weber Mendonça (10)
    • Mark Mikofski (1)
    • Jarrod Millman (13)
    • Harsh Mishra (6)
    • ML-Nielsen (3) +
    • Matthew Murray (1) +
    • Andrew Nelson (50)
    • Dimitri Papadopoulos Orfanos (1) +
    • Evgueni Ovtchinnikov (2) +
    • Sambit Panda (1)
    • Nick Papior (2)
    • Tirth Patel (43)
    • Petar Mlinarić (1)
    • petroselo (1) +
    • Ilhan Polat (64)
    • Anthony Polloreno (1)
    • Amit Portnoy (1) +
    • Quentin Barthélemy (9)
    • Patrick N. Raanes (1) +
    • Tyler Reddy (144)
    • Pamphile Roy (197)
    • Vivek Roy (2) +
    • sabonerune (1) +
    • Niyas Sait (2) +
    • Atsushi Sakai (25)
    • Mazen Sayed (1) +
    • Eduardo Schettino (5) +
    • Daniel Schmitz (6) +
    • Eli Schwartz (4) +
    • SELEE (2) +
    • Namami Shanker (4)
    • siddhantwahal (1) +
    • Gagandeep Singh (8)
    • Soph (1) +
    • Shivnaren Srinivasan (1) +
    • Scott Staniewicz (1) +
    • Leo C. Stein (4)
    • Albert Steppi (7)
    • Christopher Strickland (1) +
    • Kai Striega (4)
    • Søren Fuglede Jørgensen (1)
    • Aleksandr Tagilov (1) +
    • Masayuki Takagi (1) +
    • Sai Teja (1) +
    • Ewout ter Hoeven (2) +
    • Will Tirone (2)
    • Bas van Beek (7)
    • Dhruv Vats (1)
    • H. Vetinari (6)
    • Arthur Volant (1)
    • Samuel Wallan (5)
    • Stefan van der Walt (8)
    • Warren Weckesser (83)
    • Anreas Weh (1)
    • Nils Werner (1)
    • Aviv Yaish (1) +
    • Dowon Yi (1)
    • Rory Yorke (1)
    • Yosshi999 (1) +
    • yuanx749 (2) +
    • Gang Zhao (23)
    • ZhihuiChen0903 (1)
    • Pavel Zun (1) +
    • David Zwicker (1) +

    A total of 155 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(377.01 KB)
    README.txt(96.27 KB)
    scipy-1.9.0rc2-cp310-cp310-macosx_10_9_x86_64.whl(35.06 MB)
    scipy-1.9.0rc2-cp310-cp310-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc2-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.74 MB)
    scipy-1.9.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.29 MB)
    scipy-1.9.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.86 MB)
    scipy-1.9.0rc2-cp310-cp310-win_amd64.whl(36.69 MB)
    scipy-1.9.0rc2-cp38-cp38-macosx_10_9_x86_64.whl(34.87 MB)
    scipy-1.9.0rc2-cp38-cp38-macosx_12_0_arm64.whl(28.39 MB)
    scipy-1.9.0rc2-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.43 MB)
    scipy-1.9.0rc2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(36.01 MB)
    scipy-1.9.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.46 MB)
    scipy-1.9.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.34 MB)
    scipy-1.9.0rc2-cp38-cp38-win32.whl(32.86 MB)
    scipy-1.9.0rc2-cp38-cp38-win_amd64.whl(36.69 MB)
    scipy-1.9.0rc2-cp39-cp39-macosx_10_9_x86_64.whl(35.03 MB)
    scipy-1.9.0rc2-cp39-cp39-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc2-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.70 MB)
    scipy-1.9.0rc2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(36.20 MB)
    scipy-1.9.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.84 MB)
    scipy-1.9.0rc2-cp39-cp39-win32.whl(32.89 MB)
    scipy-1.9.0rc2-cp39-cp39-win_amd64.whl(36.73 MB)
    scipy-1.9.0rc2.tar.gz(40.04 MB)
  • v1.9.0rc1(Jun 24, 2022)

    SciPy 1.9.0 Release Notes

    Note: SciPy 1.9.0 is not released yet!

    SciPy 1.9.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.9.x branch, and on adding new features on the main branch.

    This release requires Python 3.8+ and NumPy 1.18.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • We have modernized our build system to use meson, substantially reducing our source build times
    • Added scipy.optimize.milp, new function for mixed-integer linear programming.
    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.
    • Tensor-product spline interpolation modes were added to scipy.interpolate.RegularGridInterpolator.
    • A new global optimizer (DIviding RECTangles algorithm) scipy.optimize.direct

    New features

    scipy.interpolate improvements

    • Speed up the RBFInterpolator evaluation with high dimensional interpolants.
    • Added new spline based interpolation methods for scipy.interpolate.RegularGridInterpolator and its tutorial.
    • scipy.interpolate.RegularGridInterpolator and scipy.interpolate.interpn now accept descending ordered points.
    • RegularGridInterpolator now handles length-1 grid axes.
    • The BivariateSpline subclasses have a new method partial_derivative which constructs a new spline object representing a derivative of an original spline. This mirrors the corresponding functionality for univariate splines, splder and BSpline.derivative, and can substantially speed up repeated evaluation of derivatives.

    scipy.linalg improvements

    • scipy.linalg.expm now accepts nD arrays. Its speed is also improved.
    • Minimum required LAPACK version is bumped to 3.7.1.

    scipy.fft improvements

    • Added uarray multimethods for scipy.fft.fht and scipy.fft.ifht to allow provision of third party backend implementations such as those recently added to CuPy.

    scipy.optimize improvements

    • A new global optimizer, scipy.optimize.direct (DIviding RECTangles algorithm) was added. For problems with inexpensive function evaluations, like the ones in the SciPy benchmark suite, direct is competitive with the best other solvers in SciPy (dual_annealing and differential_evolution) in terms of execution time. See gh-14300 <https://github.com/scipy/scipy/pull/14300>__ for more details.

    • Add a full_output parameter to scipy.optimize.curve_fit to output additional solution information.

    • Add a integrality parameter to scipy.optimize.differential_evolution, enabling integer constraints on parameters.

    • Add a vectorized parameter to call a vectorized objective function only once per iteration. This can improve minimization speed by reducing interpreter overhead from the multiple objective function calls.

    • The default method of scipy.optimize.linprog is now 'highs'.

    • Added scipy.optimize.milp, new function for mixed-integer linear programming.

    • Added Newton-TFQMR method to newton_krylov.

    • Added support for the Bounds class in shgo and dual_annealing for a more uniform API across scipy.optimize.

    • Added the vectorized keyword to differential_evolution.

    • approx_fprime now works with vector-valued functions.

    scipy.signal improvements

    • The new window function scipy.signal.windows.kaiser_bessel_derived was added to compute the Kaiser-Bessel derived window.
    • Single-precision hilbert operations are now faster as a result of more consistent dtype handling.

    scipy.sparse improvements

    • Add a copy parameter to scipy.sparce.csgraph.laplacian. Using inplace computation with copy=False reduces the memory footprint.
    • Add a dtype parameter to scipy.sparce.csgraph.laplacian for type casting.
    • Add a symmetrized parameter to scipy.sparce.csgraph.laplacian to produce symmetric Laplacian for directed graphs.
    • Add a form parameter to scipy.sparce.csgraph.laplacian taking one of the three values: array, or function, or lo determining the format of the output Laplacian:
      • array is a numpy array (backward compatible default);
      • function is a pointer to a lambda-function evaluating the Laplacian-vector or Laplacian-matrix product;
      • lo results in the format of the LinearOperator.

    scipy.sparse.linalg improvements

    • lobpcg performance improvements for small input cases.

    scipy.spatial improvements

    • Add an order parameter to scipy.spatial.transform.Rotation.from_quat and scipy.spatial.transform.Rotation.as_quat to specify quaternion format.

    scipy.stats improvements

    • scipy.stats.monte_carlo_test performs one-sample Monte Carlo hypothesis tests to assess whether a sample was drawn from a given distribution. Besides reproducing the results of hypothesis tests like scipy.stats.ks_1samp, scipy.stats.normaltest, and scipy.stats.cramervonmises without small sample size limitations, it makes it possible to perform similar tests using arbitrary statistics and distributions.

    • Several scipy.stats functions support new axis (integer or tuple of integers) and nan_policy ('raise', 'omit', or 'propagate'), and keepdims arguments. These functions also support masked arrays as inputs, even if they do not have a scipy.stats.mstats counterpart. Edge cases for multidimensional arrays, such as when axis-slices have no unmasked elements or entire inputs are of size zero, are handled consistently.

    • Add a weight parameter to scipy.stats.hmean.

    • Several improvements have been made to scipy.stats.levy_stable. Substantial improvement has been made for numerical evaluation of the pdf and cdf, resolving #12658 and #14944. The improvement is particularly dramatic for stability parameter alpha close to or equal to 1 and for alpha below but approaching its maximum value of 2. The alternative fast Fourier transform based method for pdf calculation has also been updated to use the approach of Wang and Zhang from their 2008 conference paper Simpson’s rule based FFT method to compute densities of stable distribution, making this method more competitive with the default method. In addition, users now have the option to change the parametrization of the Levy Stable distribution to Nolan's "S0" parametrization which is used internally by SciPy's pdf and cdf implementations. The "S0" parametrization is described in Nolan's paper Numerical calculation of stable densities and distribution functions upon which SciPy's implementation is based. "S0" has the advantage that delta and gamma are proper location and scale parameters. With delta and gamma fixed, the location and scale of the resulting distribution remain unchanged as alpha and beta change. This is not the case for the default "S1" parametrization. Finally, more options have been exposed to allow users to trade off between runtime and accuracy for both the default and FFT methods of pdf and cdf calculation. More information can be found in the documentation here (to be linked).

    • Added scipy.stats.fit for fitting discrete and continuous distributions to data.

    • The methods "pearson" and "tippet" from scipy.stats.combine_pvalues have been fixed to return the correct p-values, resolving #15373. In addition, the documentation for scipy.stats.combine_pvalues has been expanded and improved.

    • Unlike other reduction functions, stats.mode didn't consume the axis being operated on and failed for negative axis inputs. Both the bugs have been fixed. Note that stats.mode will now consume the input axis and return an ndarray with the axis dimension removed.

    • Replaced implementation of scipy.stats.ncf with the implementation from Boost for improved reliability.

    • Add a bits parameter to scipy.stats.qmc.Sobol. It allows to use from 0 to 64 bits to compute the sequence. Default is None which corresponds to 30 for backward compatibility. Using a higher value allow to sample more points. Note: bits does not affect the output dtype.

    • Add a integers method to scipy.stats.qmc.QMCEngine. It allows sampling integers using any QMC sampler.

    • Improved the fit speed and accuracy of stats.pareto.

    • Added qrvs method to NumericalInversePolynomial to match the situation for NumericalInverseHermite.

    • Faster random variate generation for gennorm and nakagami.

    • lloyd_centroidal_voronoi_tessellation has been added to allow improved sample distributions via iterative application of Voronoi diagrams and centering operations

    • Add scipy.stats.qmc.PoissonDisk to sample using the Poisson disk sampling method. It guarantees that samples are separated from each other by a given radius.

    • Add scipy.stats.pmean to calculate the weighted power mean also called generalized mean.

    Deprecated features

    • Due to collision with the shape parameter n of several distributions, use of the distribution moment method with keyword argument n is deprecated. Keyword n is replaced with keyword order.
    • Similarly, use of the distribution interval method with keyword arguments alpha is deprecated. Keyword alpha is replaced with keyword confidence.
    • The 'simplex', 'revised simplex', and 'interior-point' methods of scipy.optimize.linprog are deprecated. Methods highs, highs-ds, or highs-ipm should be used in new code.
    • Support for non-numeric arrays has been deprecated from stats.mode. pandas.DataFrame.mode can be used instead.
    • The function spatial.distance.kulsinski has been deprecated in favor of spatial.distance.kulczynski1.
    • The maxiter keyword of the truncated Newton (TNC) algorithm has been deprecated in favour of maxfun.
    • The vertices keyword of Delauney.qhull now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.
    • The extradoc keyword of rv_continuous, rv_discrete and rv_sample now raises a DeprecationWarning, after having been deprecated in documentation only for a long time.

    Expired Deprecations

    There is an ongoing effort to follow through on long-standing deprecations. The following previously deprecated features are affected:

    • Object arrays in sparse matrices now raise an error.
    • Inexact indices into sparse matrices now raise an error.
    • Passing radius=None to scipy.spatial.SphericalVoronoi now raises an error (not adding radius defaults to 1, as before).
    • Several BSpline methods now raise an error if inputs have ndim > 1.
    • The _rvs method of statistical distributions now requires a size parameter.
    • Passing a fillvalue that cannot be cast to the output type in scipy.signal.convolve2d now raises an error.
    • scipy.spatial.distance now enforces that the input vectors are one-dimensional.
    • Removed stats.itemfreq.
    • Removed stats.median_absolute_deviation.
    • Removed n_jobs keyword argument and use of k=None from kdtree.query.
    • Removed right keyword from interpolate.PPoly.extend.
    • Removed debug keyword from scipy.linalg.solve_*.
    • Removed class _ppform scipy.interpolate.
    • Removed BSR methods matvec and matmat.
    • Removed mlab truncation mode from cluster.dendrogram.
    • Removed cluster.vq.py_vq2.
    • Removed keyword arguments ftol and xtol from optimize.minimize(method='Nelder-Mead').
    • Removed signal.windows.hanning.
    • Removed LAPACK gegv functions from linalg; this raises the minimally required LAPACK version to 3.7.1.
    • Removed spatial.distance.matching.
    • Removed the alias scipy.random for numpy.random.
    • Removed docstring related functions from scipy.misc (docformat, inherit_docstring_from, extend_notes_in_docstring, replace_notes_in_docstring, indentcount_lines, filldoc, unindent_dict, unindent_string).
    • Removed linalg.pinv2.

    Backwards incompatible changes

    • Several scipy.stats functions now convert np.matrix to np.ndarrays before the calculation is performed. In this case, the output will be a scalar or np.ndarray of appropriate shape rather than a 2D np.matrix. Similarly, while masked elements of masked arrays are still ignored, the output will be a scalar or np.ndarray rather than a masked array with mask=False.
    • The default method of scipy.optimize.linprog is now 'highs', not 'interior-point' (which is now deprecated), so callback functions and some options are no longer supported with the default method.
    • For scipy.stats.combine_pvalues, the sign of the test statistic returned for the method "pearson" has been flipped so that higher values of the statistic now correspond to lower p-values, making the statistic more consistent with those of the other methods and with the majority of the literature.
    • scipy.linalg.expm due to historical reasons was using the sparse implementation and thus was accepting sparse arrays. Now it only works with nDarrays. For sparse usage, scipy.sparse.linalg.expm needs to be used explicitly.
    • The definition of scipy.stats.circvar has reverted to the one that is standard in the literature; note that this is not the same as the square of scipy.stats.circstd.
    • Remove inheritance to QMCEngine in MultinomialQMC and MultivariateNormalQMC. It removes the methods fast_forward and reset.
    • Init of MultinomialQMC now require the number of trials with n_trials. Hence, MultinomialQMC.random output has now the correct shape (n, pvals).
    • Several function-specific warnings (F_onewayConstantInputWarning, F_onewayBadInputSizesWarning, PearsonRConstantInputWarning, PearsonRNearConstantInputWarning, SpearmanRConstantInputWarning, and BootstrapDegenerateDistributionWarning) have been replaced with more general warnings.

    Other changes

    • A draft developer CLI is available for SciPy, leveraging the doit, click and rich-click tools. For more details, see gh-15959.

    • The SciPy contributor guide has been reorganized and updated (see #15947 for details).

    • QUADPACK Fortran routines in scipy.integrate, which power scipy.integrate.quad, have been marked as recursive. This should fix rare issues in multivariate integration (nquad and friends) and obviate the need for compiler-specific compile flags (/recursive for ifort etc). Please file an issue if this change turns out problematic for you. This is also true for FITPACK routines in scipy.interpolate, which power splrep, splev etc., and *UnivariateSpline and *BivariateSpline classes.

    • the USE_PROPACK environment variable has been renamed to SCIPY_USE_PROPACK; setting to a non-zero value will enable the usage of the PROPACK library as before

    Lazy access to subpackages

    Before this release, all subpackages of SciPy (cluster, fft, ndimage, etc.) had to be explicitly imported. Now, these subpackages are lazily loaded as soon as they are accessed, so that the following is possible (if desired for interactive use, it's not actually recommended for code, see :ref:scipy-api): import scipy as sp; sp.fft.dct([1, 2, 3]). Advantages include: making it easier to navigate SciPy in interactive terminals, reducing subpackage import conflicts (which before required import networkx.linalg as nla; import scipy.linalg as sla), and avoiding repeatedly having to update imports during teaching & experimentation. Also see the related community specification document.

    SciPy switched to Meson as its build system

    This is the first release that ships with Meson as the build system. When installing with pip or pypa/build, Meson will be used (invoked via the meson-python build hook). This change brings significant benefits - most importantly much faster build times, but also better support for cross-compilation and cleaner build logs.

    Note:

    This release still ships with support for numpy.distutils-based builds as well. Those can be invoked through the setup.py command-line interface (e.g., python setup.py install). It is planned to remove numpy.distutils support before the 1.10.0 release.

    When building from source, a number of things have changed compared to building with numpy.distutils:

    • New build dependencies: meson, ninja, and pkg-config. setuptools and wheel are no longer needed.
    • BLAS and LAPACK libraries that are supported haven't changed, however the discovery mechanism has: that is now using pkg-config instead of hardcoded paths or a site.cfg file.
    • The build defaults to using OpenBLAS. See :ref:blas-lapack-selection for details.

    The two CLIs that can be used to build wheels are pip and build. In addition, the SciPy repo contains a python dev.py CLI for any kind of development task (see its --help for details). For a comparison between old (distutils) and new (meson) build commands, see :ref:meson-faq.

    For more information on the introduction of Meson support in SciPy, see gh-13615 <https://github.com/scipy/scipy/issues/13615>__ and this blog post <https://labs.quansight.org/blog/2021/07/moving-scipy-to-meson/>__.

    Authors

    • endolith (12)
    • Caio Agiani (2) +
    • Emmy Albert (1) +
    • Joseph Albert (1)
    • Tania Allard (3)
    • Carsten Allefeld (1) +
    • Kartik Anand (1) +
    • Virgile Andreani (2) +
    • Weh Andreas (1) +
    • Francesco Andreuzzi (5) +
    • Kian-Meng Ang (2) +
    • Gerrit Ansmann (1)
    • Ar-Kareem (1) +
    • Shehan Atukorala (1) +
    • avishai231 (1) +
    • Blair Azzopardi (1)
    • Sayantika Banik (2) +
    • Ross Barnowski (8)
    • Christoph Baumgarten (3)
    • Nickolai Belakovski (1)
    • Peter Bell (9)
    • Sebastian Berg (2)
    • Bharath (1) +
    • bobcatCA (2) +
    • boussoffara (2) +
    • Islem BOUZENIA (1) +
    • Jake Bowhay (41) +
    • Matthew Brett (11)
    • Dietrich Brunn (2) +
    • Michael Burkhart (2) +
    • Evgeni Burovski (96)
    • Matthias Bussonnier (20)
    • Dominic C (1)
    • Cameron (1) +
    • CJ Carey (3)
    • Thomas A Caswell (2)
    • Ali Cetin (2) +
    • Hood Chatham (5) +
    • Klesk Chonkin (1)
    • Craig Citro (1) +
    • Dan Cogswell (1) +
    • Luigi Cruz (1) +
    • Anirudh Dagar (5)
    • Brandon David (1)
    • deepakdinesh1123 (1) +
    • Denton DeLoss (1) +
    • derbuihan (2) +
    • Sameer Deshmukh (13) +
    • Niels Doucet (1) +
    • DWesl (8)
    • eytanadler (30) +
    • Thomas J. Fan (5)
    • Isuru Fernando (3)
    • Joseph Fox-Rabinovitz (1)
    • Ryan Gibson (4) +
    • Ralf Gommers (308)
    • Srinivas Gorur-Shandilya (1) +
    • Alex Griffing (2)
    • h-vetinari (3)
    • Matt Haberland (442)
    • Tristan Hearn (1) +
    • Jonathan Helgert (1) +
    • Samuel Hinton (1) +
    • Jake (1) +
    • Stewart Jamieson (1) +
    • Jan-Hendrik Müller (1)
    • Yikun Jiang (1) +
    • JuliaMelle01 (1) +
    • jyuv (12) +
    • Chris Keefe (1) +
    • Robert Kern (4)
    • Andrew Knyazev (11)
    • Matthias Koeppe (4) +
    • Sergey Koposov (1)
    • Volodymyr Kozachynskyi (1) +
    • Yotaro Kubo (2) +
    • Jacob Lapenna (1) +
    • Peter Mahler Larsen (8)
    • Eric Larson (4)
    • Laurynas Mikšys (1) +
    • Antony Lee (1)
    • Gregory R. Lee (2)
    • lerichi (1) +
    • Tim Leslie (2)
    • P. L. Lim (1)
    • Smit Lunagariya (43)
    • lutefiskhotdish (1) +
    • Cong Ma (12)
    • Syrtis Major (1)
    • Nicholas McKibben (17)
    • Melissa Weber Mendonça (10)
    • Mark Mikofski (1)
    • Jarrod Millman (13)
    • Harsh Mishra (6)
    • ML-Nielsen (3) +
    • Matthew Murray (1) +
    • Andrew Nelson (50)
    • Dimitri Papadopoulos Orfanos (1) +
    • Evgueni Ovtchinnikov (2) +
    • Sambit Panda (1)
    • Nick Papior (2)
    • Tirth Patel (43)
    • Petar Mlinarić (1)
    • petroselo (1) +
    • Ilhan Polat (64)
    • Anthony Polloreno (1)
    • Amit Portnoy (1) +
    • Quentin Barthélemy (9)
    • Patrick N. Raanes (1) +
    • Tyler Reddy (121)
    • Pamphile Roy (196)
    • Vivek Roy (2) +
    • Niyas Sait (2) +
    • Atsushi Sakai (25)
    • Mazen Sayed (1) +
    • Eduardo Schettino (5) +
    • Daniel Schmitz (6) +
    • Eli Schwartz (3) +
    • SELEE (2) +
    • Namami Shanker (4)
    • siddhantwahal (1) +
    • Gagandeep Singh (8)
    • Soph (1) +
    • Shivnaren Srinivasan (1) +
    • Scott Staniewicz (1) +
    • Leo C. Stein (4)
    • Albert Steppi (7)
    • Christopher Strickland (1) +
    • Kai Striega (4)
    • Søren Fuglede Jørgensen (1)
    • Aleksandr Tagilov (1) +
    • Masayuki Takagi (1) +
    • Sai Teja (1) +
    • Ewout ter Hoeven (2) +
    • Will Tirone (2)
    • Bas van Beek (7)
    • Dhruv Vats (1)
    • H. Vetinari (4)
    • Arthur Volant (1)
    • Samuel Wallan (5)
    • Stefan van der Walt (8)
    • Warren Weckesser (83)
    • Anreas Weh (1)
    • Nils Werner (1)
    • Aviv Yaish (1) +
    • Dowon Yi (1)
    • Rory Yorke (1)
    • Yosshi999 (1) +
    • yuanx749 (2) +
    • Gang Zhao (23)
    • ZhihuiChen0903 (1)
    • Pavel Zun (1) +
    • David Zwicker (1) +

    A total of 153 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(367.11 KB)
    README.txt(93.89 KB)
    scipy-1.9.0rc1-cp310-cp310-macosx_10_9_x86_64.whl(35.06 MB)
    scipy-1.9.0rc1-cp310-cp310-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc1-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.73 MB)
    scipy-1.9.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.28 MB)
    scipy-1.9.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.86 MB)
    scipy-1.9.0rc1-cp310-cp310-win_amd64.whl(36.69 MB)
    scipy-1.9.0rc1-cp38-cp38-macosx_10_9_x86_64.whl(34.87 MB)
    scipy-1.9.0rc1-cp38-cp38-macosx_12_0_arm64.whl(28.39 MB)
    scipy-1.9.0rc1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.43 MB)
    scipy-1.9.0rc1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(36.00 MB)
    scipy-1.9.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.46 MB)
    scipy-1.9.0rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.34 MB)
    scipy-1.9.0rc1-cp38-cp38-win32.whl(32.85 MB)
    scipy-1.9.0rc1-cp38-cp38-win_amd64.whl(36.69 MB)
    scipy-1.9.0rc1-cp39-cp39-macosx_10_9_x86_64.whl(35.03 MB)
    scipy-1.9.0rc1-cp39-cp39-macosx_12_0_arm64.whl(28.50 MB)
    scipy-1.9.0rc1-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(55.70 MB)
    scipy-1.9.0rc1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(36.19 MB)
    scipy-1.9.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(38.27 MB)
    scipy-1.9.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(41.84 MB)
    scipy-1.9.0rc1-cp39-cp39-win32.whl(32.88 MB)
    scipy-1.9.0rc1-cp39-cp39-win_amd64.whl(36.74 MB)
    scipy-1.9.0rc1.tar.gz(40.09 MB)
  • v1.8.1(May 18, 2022)

    SciPy 1.8.1 Release Notes

    SciPy 1.8.1 is a bug-fix release with no new features compared to 1.8.0. Notably, usage of Pythran has been restored for Windows builds/binaries.

    Authors

    • Henry Schreiner
    • Maximilian Nöthe
    • Sebastian Berg (1)
    • Sameer Deshmukh (1) +
    • Niels Doucet (1) +
    • DWesl (4)
    • Isuru Fernando (1)
    • Ralf Gommers (4)
    • Matt Haberland (1)
    • Andrew Nelson (1)
    • Dimitri Papadopoulos Orfanos (1) +
    • Tirth Patel (3)
    • Tyler Reddy (46)
    • Pamphile Roy (7)
    • Niyas Sait (1) +
    • H. Vetinari (2)
    • Warren Weckesser (1)

    A total of 17 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(11.93 KB)
    README(10.27 KB)
    scipy-1.8.1-cp310-cp310-macosx_10_9_x86_64.whl(33.41 MB)
    scipy-1.8.1-cp310-cp310-macosx_12_0_arm64.whl(27.34 MB)
    scipy-1.8.1-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.07 MB)
    scipy-1.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.09 MB)
    scipy-1.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.22 MB)
    scipy-1.8.1-cp310-cp310-win_amd64.whl(35.21 MB)
    scipy-1.8.1-cp38-cp38-macosx_10_9_x86_64.whl(33.22 MB)
    scipy-1.8.1-cp38-cp38-macosx_12_0_arm64.whl(27.23 MB)
    scipy-1.8.1-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(52.78 MB)
    scipy-1.8.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(34.75 MB)
    scipy-1.8.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.25 MB)
    scipy-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(39.69 MB)
    scipy-1.8.1-cp38-cp38-win32.whl(31.84 MB)
    scipy-1.8.1-cp38-cp38-win_amd64.whl(35.15 MB)
    scipy-1.8.1-cp39-cp39-macosx_10_9_x86_64.whl(33.38 MB)
    scipy-1.8.1-cp39-cp39-macosx_12_0_arm64.whl(27.34 MB)
    scipy-1.8.1-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.05 MB)
    scipy-1.8.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(34.94 MB)
    scipy-1.8.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.06 MB)
    scipy-1.8.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.20 MB)
    scipy-1.8.1-cp39-cp39-win32.whl(31.88 MB)
    scipy-1.8.1-cp39-cp39-win_amd64.whl(35.19 MB)
    scipy-1.8.1.tar.gz(36.42 MB)
    scipy-1.8.1.tar.xz(27.33 MB)
    scipy-1.8.1.zip(47.97 MB)
  • v1.8.0(Feb 5, 2022)

    SciPy 1.8.0 Release Notes

    SciPy 1.8.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.8.x branch, and on adding new features on the master branch.

    This release requires Python 3.8+ and NumPy 1.17.3 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A sparse array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases.
    • The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. It is currently default-off due to potential issues on Windows that we aim to resolve in the next release, but can be optionally enabled at runtime for friendly testing with an environment variable setting of USE_PROPACK=1.
    • A new scipy.stats.sampling submodule that leverages the UNU.RAN C library to sample from arbitrary univariate non-uniform continuous and discrete distributions
    • All namespaces that were private but happened to miss underscores in their names have been deprecated.

    New features

    scipy.fft improvements

    Added an orthogonalize=None parameter to the real transforms in scipy.fft which controls whether the modified definition of DCT/DST is used without changing the overall scaling.

    scipy.fft backend registration is now smoother, operating with a single registration call and no longer requiring a context manager.

    scipy.integrate improvements

    scipy.integrate.quad_vec introduces a new optional keyword-only argument, args. args takes in a tuple of extra arguments if any (default is args=()), which is then internally used to pass into the callable function (needing these extra arguments) which we wish to integrate.

    scipy.interpolate improvements

    scipy.interpolate.BSpline has a new method, design_matrix, which constructs a design matrix of b-splines in the sparse CSR format.

    A new method from_cubic in BSpline class allows to convert a CubicSpline object to BSpline object.

    scipy.linalg improvements

    scipy.linalg gained three new public array structure investigation functions. scipy.linalg.bandwidth returns information about the bandedness of an array and can be used to test for triangular structure discovery, while scipy.linalg.issymmetric and scipy.linalg.ishermitian test the array for exact and approximate symmetric/Hermitian structure.

    scipy.optimize improvements

    scipy.optimize.check_grad introduces two new optional keyword only arguments, direction and seed. direction can take values, 'all' (default), in which case all the one hot direction vectors will be used for verifying the input analytical gradient function and 'random', in which case a random direction vector will be used for the same purpose. seed (default is None) can be used for reproducing the return value of check_grad function. It will be used only when direction='random'.

    The scipy.optimize.minimize TNC method has been rewritten to use Cython bindings. This also fixes an issue with the callback altering the state of the optimization.

    Added optional parameters target_accept_rate and stepwise_factor for adapative step size adjustment in basinhopping.

    The epsilon argument to approx_fprime is now optional so that it may have a default value consistent with most other functions in scipy.optimize.

    scipy.signal improvements

    Add analog argument, default False, to zpk2sos, and add new pairing option 'minimal' to construct analog and minimal discrete SOS arrays. tf2sos uses zpk2sos; add analog argument here as well, and pass it on to zpk2sos.

    savgol_coeffs and savgol_filter now work for even window lengths.

    Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT and scipy.signal.ZoomFFT.

    scipy.sparse improvements

    An array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases. Please refer to the scipy.sparse docstring for more information.

    maximum_flow introduces optional keyword only argument, method which accepts either, 'edmonds-karp' (Edmonds Karp algorithm) or 'dinic' (Dinic's algorithm). Moreover, 'dinic' is used as default value for method which means that Dinic's algorithm is used for computing maximum flow unless specified. See, the comparison between the supported algorithms in this comment <https://github.com/scipy/scipy/pull/14358#issue-684212523>_.

    Parameters atol, btol now default to 1e-6 in scipy.sparse.linalg.lsmr to match with default values in scipy.sparse.linalg.lsqr.

    Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr.

    The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. For some problems, this may be faster and/or more accurate than the default, ARPACK. PROPACK functionality is currently opt-in--you must specify USE_PROPACK=1 at runtime to use it due to potential issues on Windows that we aim to resolve in the next release.

    sparse.linalg iterative solvers now have a nonzero initial guess option, which may be specified as x0 = 'Mb'.

    The trace method has been added for sparse matrices.

    scipy.spatial improvements

    scipy.spatial.transform.Rotation now supports item assignment and has a new concatenate method.

    Add scipy.spatial.distance.kulczynski1 in favour of scipy.spatial.distance.kulsinski which will be deprecated in the next release.

    scipy.spatial.distance.minkowski now also supports 0<p<1.

    scipy.special improvements

    The new function scipy.special.log_expit computes the logarithm of the logistic sigmoid function. The function is formulated to provide accurate results for large positive and negative inputs, so it avoids the problems that would occur in the naive implementation log(expit(x)).

    A suite of five new functions for elliptic integrals: scipy.special.ellipr{c,d,f,g,j}. These are the Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>_, which have computational advantages over the classical Legendre integrals. Previous versions included some elliptic integrals from the Cephes library (scipy.special.ellip{k,km1,kinc,e,einc}) but was missing the integral of third kind (Legendre's Pi), which can be evaluated using the new Carlson functions. The new Carlson elliptic integral functions can be evaluated in the complex plane, whereas the Cephes library's functions are only defined for real inputs.

    Several defects in scipy.special.hyp2f1 have been corrected. Approximately correct values are now returned for z near exp(+-i*pi/3), fixing #8054 <https://github.com/scipy/scipy/issues/8054>. Evaluation for such z is now calculated through a series derived by López and Temme (2013) <https://arxiv.org/abs/1306.2046> that converges in these regions. In addition, degenerate cases with one or more of a, b, and/or c a non-positive integer are now handled in a manner consistent with mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>, which fixes #7340 <https://github.com/scipy/scipy/issues/7340>. These fixes were made as part of an effort to rewrite the Fortran 77 implementation of hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.

    scipy.stats improvements

    scipy.stats.qmc.LatinHypercube introduces two new optional keyword-only arguments, optimization and strength. optimization is either None or random-cd. In the latter, random permutations are performed to improve the centered discrepancy. strength is either 1 or 2. 1 corresponds to the classical LHS while 2 has better sub-projection properties. This construction is referred to as an orthogonal array based LHS of strength 2. In both cases, the output is still a LHS.

    scipy.stats.qmc.Halton is faster as the underlying Van der Corput sequence was ported to Cython.

    The alternative parameter was added to the kendalltau and somersd functions to allow one-sided hypothesis testing. Similarly, the masked versions of skewtest, kurtosistest, ttest_1samp, ttest_ind, and ttest_rel now also have an alternative parameter.

    Add scipy.stats.gzscore to calculate the geometrical z score.

    Random variate generators to sample from arbitrary univariate non-uniform continuous and discrete distributions have been added to the new scipy.stats.sampling submodule. Implementations of a C library UNU.RAN <http://statmath.wu.ac.at/software/unuran/>_ are used for performance. The generators added are:

    • TransformedDensityRejection
    • DiscreteAliasUrn
    • NumericalInversePolynomial
    • DiscreteGuideTable
    • SimpleRatioUniforms

    The binned_statistic set of functions now have improved performance for the std, min, max, and median statistic calculations.

    somersd and _tau_b now have faster Pythran-based implementations.

    Some general efficiency improvements to handling of nan values in several stats functions.

    Added the Tukey-Kramer test as scipy.stats.tukey_hsd.

    Improved performance of scipy.stats.argus rvs method.

    Added the parameter keepdims to scipy.stats.variation and prevent the undesirable return of a masked array from the function in some cases.

    permutation_test performs an exact or randomized permutation test of a given statistic on provided data.

    Deprecated features

    Clear split between public and private API

    SciPy has always documented what its public API consisted of in :ref:its API reference docs <scipy-api>, however there never was a clear split between public and private namespaces in the code base. In this release, all namespaces that were private but happened to miss underscores in their names have been deprecated. These include (as examples, there are many more):

    • scipy.signal.spline
    • scipy.ndimage.filters
    • scipy.ndimage.fourier
    • scipy.ndimage.measurements
    • scipy.ndimage.morphology
    • scipy.ndimage.interpolation
    • scipy.sparse.linalg.solve
    • scipy.sparse.linalg.eigen
    • scipy.sparse.linalg.isolve

    All functions and other objects in these namespaces that were meant to be public are accessible from their respective public namespace (e.g. scipy.signal). The design principle is that any public object must be accessible from a single namespace only; there are a few exceptions, mostly for historical reasons (e.g., stats and stats.distributions overlap). For other libraries aiming to provide a SciPy-compatible API, it is now unambiguous what namespace structure to follow. See gh-14360 <https://github.com/scipy/scipy/issues/14360>_ for more details.

    Other deprecations

    NumericalInverseHermite has been deprecated from scipy.stats and moved to the scipy.stats.sampling submodule. It now uses the C implementation of the UNU.RAN library so the result of methods like ppf may vary slightly. Parameter tol has been deprecated and renamed to u_resolution. The parameter max_intervals has also been deprecated and will be removed in a future release of SciPy.

    Backwards incompatible changes

    • SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features. For more details see here <https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html>_.
    • The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
    • The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.

    Other changes

    Some Fortran 77 code was modernized to be compatible with NAG's nagfor Fortran compiler (see, e.g., PR 13229 <https://github.com/scipy/scipy/pull/13229>_).

    threadpoolctl may now be used by our test suite to substantially improve the efficiency of parallel test suite runs.

    Authors

    • @endolith
    • adamadanandy +
    • akeemlh +
    • Anton Akhmerov
    • Marvin Albert +
    • alegresor +
    • Andrew Annex +
    • Pantelis Antonoudiou +
    • Ross Barnowski +
    • Christoph Baumgarten
    • Stephen Becker +
    • Nickolai Belakovski
    • Peter Bell
    • berberto +
    • Georgii Bocharov +
    • Evgeni Burovski
    • Matthias Bussonnier
    • CJ Carey
    • Justin Charlong +
    • Hood Chatham +
    • Dennis Collaris +
    • David Cottrell +
    • cruyffturn +
    • da-woods +
    • Anirudh Dagar
    • Tiger Du +
    • Thomas Duvernay
    • Dani El-Ayyass +
    • Castedo Ellerman +
    • Donnie Erb +
    • Andreas Esders-Kopecky +
    • Livio F +
    • Isuru Fernando
    • Evelyn Fitzgerald +
    • Sara Fridovich-Keil +
    • Mark E Fuller +
    • Ralf Gommers
    • Kevin Richard Green +
    • guiweber +
    • Nitish Gupta +
    • h-vetinari
    • Matt Haberland
    • J. Hariharan +
    • Charles Harris
    • Jonathan Helgert +
    • Trever Hines
    • Nadav Horesh
    • Ian Hunt-Isaak +
    • ich +
    • Itrimel +
    • Jan-Hendrik Müller +
    • Jebby993 +
    • Yikun Jiang +
    • Evan W Jones +
    • Nathaniel Jones +
    • Jeffrey Kelling +
    • Malik Idrees Hasan Khan +
    • Paul Kienzle
    • Sergey B Kirpichev
    • Kadatatlu Kishore +
    • Andrew Knyazev
    • Ravin Kumar +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Tim Leslie
    • lezcano +
    • Xingyu Liu
    • Christian Lorentzen
    • Lorenzo +
    • Smit Lunagariya +
    • Lv101Magikarp +
    • Yair M +
    • Cong Ma
    • Lorenzo Maffioli +
    • majiang +
    • Brian McFee +
    • Nicholas McKibben
    • John Speed Meyers +
    • millivolt9 +
    • Jarrod Millman
    • Harsh Mishra +
    • Boaz Mohar +
    • naelsondouglas +
    • Andrew Nelson
    • Nico Schlömer
    • Thomas Nowotny +
    • nullptr +
    • Teddy Ort +
    • Nick Papior
    • ParticularMiner +
    • Dima Pasechnik
    • Tirth Patel
    • Matti Picus
    • Ilhan Polat
    • Adrian Price-Whelan +
    • Quentin Barthélemy +
    • Sundar R +
    • Judah Rand +
    • Tyler Reddy
    • Renal-Of-Loon +
    • Frederic Renner +
    • Pamphile Roy
    • Bharath Saiguhan +
    • Atsushi Sakai
    • Eric Schanet +
    • Sebastian Wallkötter
    • serge-sans-paille
    • Reshama Shaikh +
    • Namami Shanker
    • siddhantwahal +
    • Walter Simson +
    • Gagandeep Singh +
    • Leo C. Stein +
    • Albert Steppi
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Masayuki Takagi +
    • Mike Taves
    • Ben Thompson +
    • Bas van Beek
    • Jacob Vanderplas
    • Dhruv Vats +
    • H. Vetinari +
    • Thomas Viehmann +
    • Pauli Virtanen
    • Vlad +
    • Arthur Volant
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Josh Wilson
    • Haoyin Xu +
    • Rory Yorke
    • Egor Zemlyanoy
    • Gang Zhao +
    • 赵丰 (Zhao Feng) +

    A total of 139 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(324.80 KB)
    README(75.53 KB)
    scipy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl(33.40 MB)
    scipy-1.8.0-cp310-cp310-macosx_12_0_arm64.whl(27.32 MB)
    scipy-1.8.0-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.04 MB)
    scipy-1.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.19 MB)
    scipy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.31 MB)
    scipy-1.8.0-cp310-cp310-win_amd64.whl(35.23 MB)
    scipy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl(33.19 MB)
    scipy-1.8.0-cp38-cp38-macosx_12_0_arm64.whl(27.21 MB)
    scipy-1.8.0-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(52.73 MB)
    scipy-1.8.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(34.72 MB)
    scipy-1.8.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.23 MB)
    scipy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(39.66 MB)
    scipy-1.8.0-cp38-cp38-win32.whl(31.84 MB)
    scipy-1.8.0-cp38-cp38-win_amd64.whl(35.17 MB)
    scipy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl(33.35 MB)
    scipy-1.8.0-cp39-cp39-macosx_12_0_arm64.whl(27.32 MB)
    scipy-1.8.0-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.00 MB)
    scipy-1.8.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(34.92 MB)
    scipy-1.8.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.04 MB)
    scipy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.18 MB)
    scipy-1.8.0-cp39-cp39-win32.whl(31.89 MB)
    scipy-1.8.0-cp39-cp39-win_amd64.whl(35.21 MB)
    scipy-1.8.0.tar.gz(36.53 MB)
    scipy-1.8.0.tar.xz(27.41 MB)
    scipy-1.8.0.zip(48.21 MB)
  • v1.8.0rc4(Jan 30, 2022)

    SciPy 1.8.0 Release Notes

    Note: SciPy 1.8.0 is not released yet!

    SciPy 1.8.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.8.x branch, and on adding new features on the master branch.

    This release requires Python 3.8+ and NumPy 1.17.3 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A sparse array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases.
    • The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. It is currently default-off due to potential issues on Windows that we aim to resolve in the next release, but can be optionally enabled at runtime for friendly testing with an environment variable setting of USE_PROPACK=1.
    • A new scipy.stats.sampling submodule that leverages the UNU.RAN C library to sample from arbitrary univariate non-uniform continuous and discrete distributions
    • All namespaces that were private but happened to miss underscores in their names have been deprecated.

    New features

    scipy.fft improvements

    Added an orthogonalize=None parameter to the real transforms in scipy.fft which controls whether the modified definition of DCT/DST is used without changing the overall scaling.

    scipy.fft backend registration is now smoother, operating with a single registration call and no longer requiring a context manager.

    scipy.integrate improvements

    scipy.integrate.quad_vec introduces a new optional keyword-only argument, args. args takes in a tuple of extra arguments if any (default is args=()), which is then internally used to pass into the callable function (needing these extra arguments) which we wish to integrate.

    scipy.interpolate improvements

    scipy.interpolate.BSpline has a new method, design_matrix, which constructs a design matrix of b-splines in the sparse CSR format.

    A new method from_cubic in BSpline class allows to convert a CubicSpline object to BSpline object.

    scipy.linalg improvements

    scipy.linalg gained three new public array structure investigation functions. scipy.linalg.bandwidth returns information about the bandedness of an array and can be used to test for triangular structure discovery, while scipy.linalg.issymmetric and scipy.linalg.ishermitian test the array for exact and approximate symmetric/Hermitian structure.

    scipy.optimize improvements

    scipy.optimize.check_grad introduces two new optional keyword only arguments, direction and seed. direction can take values, 'all' (default), in which case all the one hot direction vectors will be used for verifying the input analytical gradient function and 'random', in which case a random direction vector will be used for the same purpose. seed (default is None) can be used for reproducing the return value of check_grad function. It will be used only when direction='random'.

    The scipy.optimize.minimize TNC method has been rewritten to use Cython bindings. This also fixes an issue with the callback altering the state of the optimization.

    Added optional parameters target_accept_rate and stepwise_factor for adapative step size adjustment in basinhopping.

    The epsilon argument to approx_fprime is now optional so that it may have a default value consistent with most other functions in scipy.optimize.

    scipy.signal improvements

    Add analog argument, default False, to zpk2sos, and add new pairing option 'minimal' to construct analog and minimal discrete SOS arrays. tf2sos uses zpk2sos; add analog argument here as well, and pass it on to zpk2sos.

    savgol_coeffs and savgol_filter now work for even window lengths.

    Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT and scipy.signal.ZoomFFT.

    scipy.sparse improvements

    An array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases. Please refer to the scipy.sparse docstring for more information.

    maximum_flow introduces optional keyword only argument, method which accepts either, 'edmonds-karp' (Edmonds Karp algorithm) or 'dinic' (Dinic's algorithm). Moreover, 'dinic' is used as default value for method which means that Dinic's algorithm is used for computing maximum flow unless specified. See, the comparison between the supported algorithms in this comment <https://github.com/scipy/scipy/pull/14358#issue-684212523>_.

    Parameters atol, btol now default to 1e-6 in scipy.sparse.linalg.lsmr to match with default values in scipy.sparse.linalg.lsqr.

    Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr.

    The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. For some problems, this may be faster and/or more accurate than the default, ARPACK. PROPACK functionality is currently opt-in--you must specify USE_PROPACK=1 at runtime to use it due to potential issues on Windows that we aim to resolve in the next release.

    sparse.linalg iterative solvers now have a nonzero initial guess option, which may be specified as x0 = 'Mb'.

    The trace method has been added for sparse matrices.

    scipy.spatial improvements

    scipy.spatial.transform.Rotation now supports item assignment and has a new concatenate method.

    Add scipy.spatial.distance.kulczynski1 in favour of scipy.spatial.distance.kulsinski which will be deprecated in the next release.

    scipy.spatial.distance.minkowski now also supports 0<p<1.

    scipy.special improvements

    The new function scipy.special.log_expit computes the logarithm of the logistic sigmoid function. The function is formulated to provide accurate results for large positive and negative inputs, so it avoids the problems that would occur in the naive implementation log(expit(x)).

    A suite of five new functions for elliptic integrals: scipy.special.ellipr{c,d,f,g,j}. These are the Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>_, which have computational advantages over the classical Legendre integrals. Previous versions included some elliptic integrals from the Cephes library (scipy.special.ellip{k,km1,kinc,e,einc}) but was missing the integral of third kind (Legendre's Pi), which can be evaluated using the new Carlson functions. The new Carlson elliptic integral functions can be evaluated in the complex plane, whereas the Cephes library's functions are only defined for real inputs.

    Several defects in scipy.special.hyp2f1 have been corrected. Approximately correct values are now returned for z near exp(+-i*pi/3), fixing #8054 <https://github.com/scipy/scipy/issues/8054>. Evaluation for such z is now calculated through a series derived by López and Temme (2013) <https://arxiv.org/abs/1306.2046> that converges in these regions. In addition, degenerate cases with one or more of a, b, and/or c a non-positive integer are now handled in a manner consistent with mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>, which fixes #7340 <https://github.com/scipy/scipy/issues/7340>. These fixes were made as part of an effort to rewrite the Fortran 77 implementation of hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.

    scipy.stats improvements

    scipy.stats.qmc.LatinHypercube introduces two new optional keyword-only arguments, optimization and strength. optimization is either None or random-cd. In the latter, random permutations are performed to improve the centered discrepancy. strength is either 1 or 2. 1 corresponds to the classical LHS while 2 has better sub-projection properties. This construction is referred to as an orthogonal array based LHS of strength 2. In both cases, the output is still a LHS.

    scipy.stats.qmc.Halton is faster as the underlying Van der Corput sequence was ported to Cython.

    The alternative parameter was added to the kendalltau and somersd functions to allow one-sided hypothesis testing. Similarly, the masked versions of skewtest, kurtosistest, ttest_1samp, ttest_ind, and ttest_rel now also have an alternative parameter.

    Add scipy.stats.gzscore to calculate the geometrical z score.

    Random variate generators to sample from arbitrary univariate non-uniform continuous and discrete distributions have been added to the new scipy.stats.sampling submodule. Implementations of a C library UNU.RAN <http://statmath.wu.ac.at/software/unuran/>_ are used for performance. The generators added are:

    • TransformedDensityRejection
    • DiscreteAliasUrn
    • NumericalInversePolynomial
    • DiscreteGuideTable
    • SimpleRatioUniforms

    The binned_statistic set of functions now have improved performance for the std, min, max, and median statistic calculations.

    somersd and _tau_b now have faster Pythran-based implementations.

    Some general efficiency improvements to handling of nan values in several stats functions.

    Added the Tukey-Kramer test as scipy.stats.tukey_hsd.

    Improved performance of scipy.stats.argus rvs method.

    Added the parameter keepdims to scipy.stats.variation and prevent the undesirable return of a masked array from the function in some cases.

    permutation_test performs an exact or randomized permutation test of a given statistic on provided data.

    Deprecated features

    Clear split between public and private API

    SciPy has always documented what its public API consisted of in :ref:its API reference docs <scipy-api>, however there never was a clear split between public and private namespaces in the code base. In this release, all namespaces that were private but happened to miss underscores in their names have been deprecated. These include (as examples, there are many more):

    • scipy.signal.spline
    • scipy.ndimage.filters
    • scipy.ndimage.fourier
    • scipy.ndimage.measurements
    • scipy.ndimage.morphology
    • scipy.ndimage.interpolation
    • scipy.sparse.linalg.solve
    • scipy.sparse.linalg.eigen
    • scipy.sparse.linalg.isolve

    All functions and other objects in these namespaces that were meant to be public are accessible from their respective public namespace (e.g. scipy.signal). The design principle is that any public object must be accessible from a single namespace only; there are a few exceptions, mostly for historical reasons (e.g., stats and stats.distributions overlap). For other libraries aiming to provide a SciPy-compatible API, it is now unambiguous what namespace structure to follow. See gh-14360 <https://github.com/scipy/scipy/issues/14360>_ for more details.

    Other deprecations

    NumericalInverseHermite has been deprecated from scipy.stats and moved to the scipy.stats.sampling submodule. It now uses the C implementation of the UNU.RAN library so the result of methods like ppf may vary slightly. Parameter tol has been deprecated and renamed to u_resolution. The parameter max_intervals has also been deprecated and will be removed in a future release of SciPy.

    Backwards incompatible changes

    • SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features. For more details see here <https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html>_.
    • The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
    • The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.

    Other changes

    Some Fortran 77 code was modernized to be compatible with NAG's nagfor Fortran compiler (see, e.g., PR 13229 <https://github.com/scipy/scipy/pull/13229>_).

    threadpoolctl may now be used by our test suite to substantially improve the efficiency of parallel test suite runs.

    Authors

    • @endolith
    • adamadanandy +
    • akeemlh +
    • Anton Akhmerov
    • Marvin Albert +
    • alegresor +
    • Andrew Annex +
    • Pantelis Antonoudiou +
    • Ross Barnowski +
    • Christoph Baumgarten
    • Stephen Becker +
    • Nickolai Belakovski
    • Peter Bell
    • berberto +
    • Georgii Bocharov +
    • Evgeni Burovski
    • Matthias Bussonnier
    • CJ Carey
    • Justin Charlong +
    • Hood Chatham +
    • Dennis Collaris +
    • David Cottrell +
    • cruyffturn +
    • da-woods +
    • Anirudh Dagar
    • Tiger Du +
    • Thomas Duvernay
    • Dani El-Ayyass +
    • Castedo Ellerman +
    • Donnie Erb +
    • Andreas Esders-Kopecky +
    • Livio F +
    • Isuru Fernando
    • Evelyn Fitzgerald +
    • Sara Fridovich-Keil +
    • Mark E Fuller +
    • Ralf Gommers
    • Kevin Richard Green +
    • guiweber +
    • Nitish Gupta +
    • h-vetinari
    • Matt Haberland
    • J. Hariharan +
    • Charles Harris
    • Jonathan Helgert +
    • Trever Hines
    • Nadav Horesh
    • Ian Hunt-Isaak +
    • ich +
    • Itrimel +
    • Jan-Hendrik Müller +
    • Jebby993 +
    • Yikun Jiang +
    • Evan W Jones +
    • Nathaniel Jones +
    • Jeffrey Kelling +
    • Malik Idrees Hasan Khan +
    • Paul Kienzle
    • Sergey B Kirpichev
    • Kadatatlu Kishore +
    • Andrew Knyazev
    • Ravin Kumar +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Tim Leslie
    • lezcano +
    • Xingyu Liu
    • Christian Lorentzen
    • Lorenzo +
    • Smit Lunagariya +
    • Lv101Magikarp +
    • Yair M +
    • Cong Ma
    • Lorenzo Maffioli +
    • majiang +
    • Brian McFee +
    • Nicholas McKibben
    • John Speed Meyers +
    • millivolt9 +
    • Jarrod Millman
    • Harsh Mishra +
    • Boaz Mohar +
    • naelsondouglas +
    • Andrew Nelson
    • Nico Schlömer
    • Thomas Nowotny +
    • nullptr +
    • Teddy Ort +
    • Nick Papior
    • ParticularMiner +
    • Dima Pasechnik
    • Tirth Patel
    • Matti Picus
    • Ilhan Polat
    • Adrian Price-Whelan +
    • Quentin Barthélemy +
    • Sundar R +
    • Judah Rand +
    • Tyler Reddy
    • Renal-Of-Loon +
    • Frederic Renner +
    • Pamphile Roy
    • Bharath Saiguhan +
    • Atsushi Sakai
    • Eric Schanet +
    • Sebastian Wallkötter
    • serge-sans-paille
    • Reshama Shaikh +
    • Namami Shanker
    • siddhantwahal +
    • Walter Simson +
    • Gagandeep Singh +
    • Leo C. Stein +
    • Albert Steppi
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Masayuki Takagi +
    • Mike Taves
    • Ben Thompson +
    • Bas van Beek
    • Jacob Vanderplas
    • Dhruv Vats +
    • H. Vetinari +
    • Thomas Viehmann +
    • Pauli Virtanen
    • Vlad +
    • Arthur Volant
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Josh Wilson
    • Haoyin Xu +
    • Rory Yorke
    • Egor Zemlyanoy
    • Gang Zhao +
    • 赵丰 (Zhao Feng) +

    A total of 139 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(323.83 KB)
    README(75.52 KB)
    scipy-1.8.0rc4-cp310-cp310-macosx_10_9_x86_64.whl(33.40 MB)
    scipy-1.8.0rc4-cp310-cp310-macosx_12_0_arm64.whl(27.32 MB)
    scipy-1.8.0rc4-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.04 MB)
    scipy-1.8.0rc4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.19 MB)
    scipy-1.8.0rc4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.31 MB)
    scipy-1.8.0rc4-cp310-cp310-win_amd64.whl(35.23 MB)
    scipy-1.8.0rc4-cp38-cp38-macosx_10_9_x86_64.whl(33.19 MB)
    scipy-1.8.0rc4-cp38-cp38-macosx_12_0_arm64.whl(27.21 MB)
    scipy-1.8.0rc4-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(52.72 MB)
    scipy-1.8.0rc4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(34.72 MB)
    scipy-1.8.0rc4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.23 MB)
    scipy-1.8.0rc4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(39.65 MB)
    scipy-1.8.0rc4-cp38-cp38-win32.whl(31.84 MB)
    scipy-1.8.0rc4-cp38-cp38-win_amd64.whl(35.17 MB)
    scipy-1.8.0rc4-cp39-cp39-macosx_10_9_x86_64.whl(33.35 MB)
    scipy-1.8.0rc4-cp39-cp39-macosx_12_0_arm64.whl(27.32 MB)
    scipy-1.8.0rc4-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(52.99 MB)
    scipy-1.8.0rc4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(34.92 MB)
    scipy-1.8.0rc4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.04 MB)
    scipy-1.8.0rc4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.18 MB)
    scipy-1.8.0rc4-cp39-cp39-win32.whl(31.89 MB)
    scipy-1.8.0rc4-cp39-cp39-win_amd64.whl(35.21 MB)
    scipy-1.8.0rc4.tar.gz(36.54 MB)
    scipy-1.8.0rc4.tar.xz(27.41 MB)
    scipy-1.8.0rc4.zip(48.33 MB)
  • v1.8.0rc3(Jan 22, 2022)

    SciPy 1.8.0 Release Notes

    Note: SciPy 1.8.0 is not released yet!

    SciPy 1.8.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.8.x branch, and on adding new features on the master branch.

    This release requires Python 3.8+ and NumPy 1.17.3 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A sparse array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases.
    • The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. It is currently default-off due to potential issues on Windows that we aim to resolve in the next release, but can be optionally enabled at runtime for friendly testing with an environment variable setting of USE_PROPACK=1.
    • A new scipy.stats.sampling submodule that leverages the UNU.RAN C library to sample from arbitrary univariate non-uniform continuous and discrete distributions
    • All namespaces that were private but happened to miss underscores in their names have been deprecated.

    New features

    scipy.fft improvements

    Added an orthogonalize=None parameter to the real transforms in scipy.fft which controls whether the modified definition of DCT/DST is used without changing the overall scaling.

    scipy.fft backend registration is now smoother, operating with a single registration call and no longer requiring a context manager.

    scipy.integrate improvements

    scipy.integrate.quad_vec introduces a new optional keyword-only argument, args. args takes in a tuple of extra arguments if any (default is args=()), which is then internally used to pass into the callable function (needing these extra arguments) which we wish to integrate.

    scipy.interpolate improvements

    scipy.interpolate.BSpline has a new method, design_matrix, which constructs a design matrix of b-splines in the sparse CSR format.

    A new method from_cubic in BSpline class allows to convert a CubicSpline object to BSpline object.

    scipy.linalg improvements

    scipy.linalg gained three new public array structure investigation functions. scipy.linalg.bandwidth returns information about the bandedness of an array and can be used to test for triangular structure discovery, while scipy.linalg.issymmetric and scipy.linalg.ishermitian test the array for exact and approximate symmetric/Hermitian structure.

    scipy.optimize improvements

    scipy.optimize.check_grad introduces two new optional keyword only arguments, direction and seed. direction can take values, 'all' (default), in which case all the one hot direction vectors will be used for verifying the input analytical gradient function and 'random', in which case a random direction vector will be used for the same purpose. seed (default is None) can be used for reproducing the return value of check_grad function. It will be used only when direction='random'.

    The scipy.optimize.minimize TNC method has been rewritten to use Cython bindings. This also fixes an issue with the callback altering the state of the optimization.

    Added optional parameters target_accept_rate and stepwise_factor for adapative step size adjustment in basinhopping.

    The epsilon argument to approx_fprime is now optional so that it may have a default value consistent with most other functions in scipy.optimize.

    scipy.signal improvements

    Add analog argument, default False, to zpk2sos, and add new pairing option 'minimal' to construct analog and minimal discrete SOS arrays. tf2sos uses zpk2sos; add analog argument here as well, and pass it on to zpk2sos.

    savgol_coeffs and savgol_filter now work for even window lengths.

    Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT and scipy.signal.ZoomFFT.

    scipy.sparse improvements

    An array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases. Please refer to the scipy.sparse docstring for more information.

    maximum_flow introduces optional keyword only argument, method which accepts either, 'edmonds-karp' (Edmonds Karp algorithm) or 'dinic' (Dinic's algorithm). Moreover, 'dinic' is used as default value for method which means that Dinic's algorithm is used for computing maximum flow unless specified. See, the comparison between the supported algorithms in this comment.

    Parameters atol, btol now default to 1e-6 in scipy.sparse.linalg.lsmr to match with default values in scipy.sparse.linalg.lsqr.

    Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr.

    The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. For some problems, this may be faster and/or more accurate than the default, ARPACK. PROPACK functionality is currently opt-in--you must specify USE_PROPACK=1 at runtime to use it due to potential issues on Windows that we aim to resolve in the next release.

    sparse.linalg iterative solvers now have a nonzero initial guess option, which may be specified as x0 = 'Mb'.

    The trace method has been added for sparse matrices.

    scipy.spatial improvements

    scipy.spatial.transform.Rotation now supports item assignment and has a new concatenate method.

    Add scipy.spatial.distance.kulczynski1 in favour of scipy.spatial.distance.kulsinski which will be deprecated in the next release.

    scipy.spatial.distance.minkowski now also supports 0<p<1.

    scipy.special improvements

    The new function scipy.special.log_expit computes the logarithm of the logistic sigmoid function. The function is formulated to provide accurate results for large positive and negative inputs, so it avoids the problems that would occur in the naive implementation log(expit(x)).

    A suite of five new functions for elliptic integrals: scipy.special.ellipr{c,d,f,g,j}. These are the Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>_, which have computational advantages over the classical Legendre integrals. Previous versions included some elliptic integrals from the Cephes library (scipy.special.ellip{k,km1,kinc,e,einc}) but was missing the integral of third kind (Legendre's Pi), which can be evaluated using the new Carlson functions. The new Carlson elliptic integral functions can be evaluated in the complex plane, whereas the Cephes library's functions are only defined for real inputs.

    Several defects in scipy.special.hyp2f1 have been corrected. Approximately correct values are now returned for z near exp(+-i*pi/3), fixing #8054 <https://github.com/scipy/scipy/issues/8054>. Evaluation for such z is now calculated through a series derived by López and Temme (2013) <https://arxiv.org/abs/1306.2046> that converges in these regions. In addition, degenerate cases with one or more of a, b, and/or c a non-positive integer are now handled in a manner consistent with mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>, which fixes #7340 <https://github.com/scipy/scipy/issues/7340>. These fixes were made as part of an effort to rewrite the Fortran 77 implementation of hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.

    scipy.stats improvements

    scipy.stats.qmc.LatinHypercube introduces two new optional keyword-only arguments, optimization and strength. optimization is either None or random-cd. In the latter, random permutations are performed to improve the centered discrepancy. strength is either 1 or 2. 1 corresponds to the classical LHS while 2 has better sub-projection properties. This construction is referred to as an orthogonal array based LHS of strength 2. In both cases, the output is still a LHS.

    scipy.stats.qmc.Halton is faster as the underlying Van der Corput sequence was ported to Cython.

    The alternative parameter was added to the kendalltau and somersd functions to allow one-sided hypothesis testing. Similarly, the masked versions of skewtest, kurtosistest, ttest_1samp, ttest_ind, and ttest_rel now also have an alternative parameter.

    Add scipy.stats.gzscore to calculate the geometrical z score.

    Random variate generators to sample from arbitrary univariate non-uniform continuous and discrete distributions have been added to the new scipy.stats.sampling submodule. Implementations of a C library UNU.RAN <http://statmath.wu.ac.at/software/unuran/>_ are used for performance. The generators added are:

    • TransformedDensityRejection
    • DiscreteAliasUrn
    • NumericalInversePolynomial
    • DiscreteGuideTable
    • SimpleRatioUniforms

    The binned_statistic set of functions now have improved performance for the std, min, max, and median statistic calculations.

    somersd and _tau_b now have faster Pythran-based implementations.

    Some general efficiency improvements to handling of nan values in several stats functions.

    Added the Tukey-Kramer test as scipy.stats.tukey_hsd.

    Improved performance of scipy.stats.argus rvs method.

    Added the parameter keepdims to scipy.stats.variation and prevent the undesirable return of a masked array from the function in some cases.

    permutation_test performs an exact or randomized permutation test of a given statistic on provided data.

    Deprecated features

    Clear split between public and private API

    SciPy has always documented what its public API consisted of in :ref:its API reference docs <scipy-api>, however there never was a clear split between public and private namespaces in the code base. In this release, all namespaces that were private but happened to miss underscores in their names have been deprecated. These include (as examples, there are many more):

    • scipy.signal.spline
    • scipy.ndimage.filters
    • scipy.ndimage.fourier
    • scipy.ndimage.measurements
    • scipy.ndimage.morphology
    • scipy.ndimage.interpolation
    • scipy.sparse.linalg.solve
    • scipy.sparse.linalg.eigen
    • scipy.sparse.linalg.isolve

    All functions and other objects in these namespaces that were meant to be public are accessible from their respective public namespace (e.g. scipy.signal). The design principle is that any public object must be accessible from a single namespace only; there are a few exceptions, mostly for historical reasons (e.g., stats and stats.distributions overlap). For other libraries aiming to provide a SciPy-compatible API, it is now unambiguous what namespace structure to follow. See gh-14360 <https://github.com/scipy/scipy/issues/14360>_ for more details.

    Other deprecations

    NumericalInverseHermite has been deprecated from scipy.stats and moved to the scipy.stats.sampling submodule. It now uses the C implementation of the UNU.RAN library so the result of methods like ppf may vary slightly. Parameter tol has been deprecated and renamed to u_resolution. The parameter max_intervals has also been deprecated and will be removed in a future release of SciPy.

    Backwards incompatible changes

    • SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features. For more details see here <https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html>_.
    • The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
    • The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.

    Other changes

    Some Fortran 77 code was modernized to be compatible with NAG's nagfor Fortran compiler (see, e.g., PR 13229 <https://github.com/scipy/scipy/pull/13229>_).

    threadpoolctl may now be used by our test suite to substantially improve the efficiency of parallel test suite runs.

    Authors

    • @endolith
    • adamadanandy +
    • akeemlh +
    • Anton Akhmerov
    • Marvin Albert +
    • alegresor +
    • Andrew Annex +
    • Pantelis Antonoudiou +
    • Ross Barnowski +
    • Christoph Baumgarten
    • Stephen Becker +
    • Nickolai Belakovski
    • Peter Bell
    • berberto +
    • Georgii Bocharov +
    • Evgeni Burovski
    • Matthias Bussonnier
    • CJ Carey
    • Justin Charlong +
    • Hood Chatham +
    • Dennis Collaris +
    • David Cottrell +
    • cruyffturn +
    • da-woods +
    • Anirudh Dagar
    • Tiger Du +
    • Thomas Duvernay
    • Dani El-Ayyass +
    • Castedo Ellerman +
    • Donnie Erb +
    • Andreas Esders-Kopecky +
    • Livio F +
    • Isuru Fernando
    • Evelyn Fitzgerald +
    • Sara Fridovich-Keil +
    • Mark E Fuller +
    • Ralf Gommers
    • Kevin Richard Green +
    • guiweber +
    • Nitish Gupta +
    • h-vetinari
    • Matt Haberland
    • J. Hariharan +
    • Charles Harris
    • Jonathan Helgert +
    • Trever Hines
    • Nadav Horesh
    • Ian Hunt-Isaak +
    • ich +
    • Itrimel +
    • Jan-Hendrik Müller +
    • Jebby993 +
    • Yikun Jiang +
    • Evan W Jones +
    • Nathaniel Jones +
    • Jeffrey Kelling +
    • Malik Idrees Hasan Khan +
    • Paul Kienzle
    • Sergey B Kirpichev
    • Kadatatlu Kishore +
    • Andrew Knyazev
    • Ravin Kumar +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Tim Leslie
    • lezcano +
    • Xingyu Liu
    • Christian Lorentzen
    • Lorenzo +
    • Smit Lunagariya +
    • Lv101Magikarp +
    • Yair M +
    • Cong Ma
    • Lorenzo Maffioli +
    • majiang +
    • Brian McFee +
    • Nicholas McKibben
    • John Speed Meyers +
    • millivolt9 +
    • Jarrod Millman
    • Harsh Mishra +
    • Boaz Mohar +
    • naelsondouglas +
    • Andrew Nelson
    • Nico Schlömer
    • Thomas Nowotny +
    • nullptr +
    • Teddy Ort +
    • Nick Papior
    • ParticularMiner +
    • Dima Pasechnik
    • Tirth Patel
    • Matti Picus
    • Ilhan Polat
    • Adrian Price-Whelan +
    • Quentin Barthélemy +
    • Sundar R +
    • Judah Rand +
    • Tyler Reddy
    • Renal-Of-Loon +
    • Frederic Renner +
    • Pamphile Roy
    • Bharath Saiguhan +
    • Atsushi Sakai
    • Eric Schanet +
    • Sebastian Wallkötter
    • serge-sans-paille
    • Reshama Shaikh +
    • Namami Shanker
    • siddhantwahal +
    • Walter Simson +
    • Gagandeep Singh +
    • Leo C. Stein +
    • Albert Steppi
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Masayuki Takagi +
    • Mike Taves
    • Ben Thompson +
    • Bas van Beek
    • Jacob Vanderplas
    • Dhruv Vats +
    • H. Vetinari +
    • Thomas Viehmann +
    • Pauli Virtanen
    • Vlad +
    • Arthur Volant
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Josh Wilson
    • Haoyin Xu +
    • Rory Yorke
    • Egor Zemlyanoy
    • Gang Zhao +
    • 赵丰 (Zhao Feng) +

    A total of 139 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(321.44 KB)
    README(74.86 KB)
    scipy-1.8.0rc3-cp310-cp310-macosx_10_9_x86_64.whl(33.72 MB)
    scipy-1.8.0rc3-cp310-cp310-macosx_12_0_arm64.whl(27.65 MB)
    scipy-1.8.0rc3-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.37 MB)
    scipy-1.8.0rc3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.52 MB)
    scipy-1.8.0rc3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.64 MB)
    scipy-1.8.0rc3-cp310-cp310-win_amd64.whl(35.56 MB)
    scipy-1.8.0rc3-cp38-cp38-macosx_10_9_x86_64.whl(33.52 MB)
    scipy-1.8.0rc3-cp38-cp38-macosx_12_0_arm64.whl(27.54 MB)
    scipy-1.8.0rc3-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.05 MB)
    scipy-1.8.0rc3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(35.05 MB)
    scipy-1.8.0rc3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.56 MB)
    scipy-1.8.0rc3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(39.98 MB)
    scipy-1.8.0rc3-cp38-cp38-win32.whl(32.17 MB)
    scipy-1.8.0rc3-cp38-cp38-win_amd64.whl(35.49 MB)
    scipy-1.8.0rc3-cp39-cp39-macosx_10_9_x86_64.whl(33.68 MB)
    scipy-1.8.0rc3-cp39-cp39-macosx_12_0_arm64.whl(27.64 MB)
    scipy-1.8.0rc3-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.32 MB)
    scipy-1.8.0rc3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(35.25 MB)
    scipy-1.8.0rc3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.37 MB)
    scipy-1.8.0rc3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.50 MB)
    scipy-1.8.0rc3-cp39-cp39-win32.whl(32.21 MB)
    scipy-1.8.0rc3-cp39-cp39-win_amd64.whl(35.53 MB)
    scipy-1.8.0rc3.tar.gz(36.43 MB)
    scipy-1.8.0rc3.tar.xz(27.32 MB)
    scipy-1.8.0rc3.zip(48.17 MB)
  • v1.8.0rc2(Dec 21, 2021)

    SciPy 1.8.0 Release Notes

    Note: SciPy 1.8.0 is not released yet!

    SciPy 1.8.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.8.x branch, and on adding new features on the master branch.

    This release requires Python 3.8+ and NumPy 1.17.3 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A sparse array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases.
    • The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'.
    • A new scipy.stats.sampling submodule that leverages the UNU.RAN C library to sample from arbitrary univariate non-uniform continuous and discrete distributions
    • All namespaces that were private but happened to miss underscores in their names have been deprecated.

    New features

    scipy.fft improvements

    Added an orthogonalize=None parameter to the real transforms in scipy.fft which controls whether the modified definition of DCT/DST is used without changing the overall scaling.

    scipy.fft backend registration is now smoother, operating with a single registration call and no longer requiring a context manager.

    scipy.integrate improvements

    scipy.integrate.quad_vec introduces a new optional keyword-only argument, args. args takes in a tuple of extra arguments if any (default is args=()), which is then internally used to pass into the callable function (needing these extra arguments) which we wish to integrate.

    scipy.interpolate improvements

    scipy.interpolate.BSpline has a new method, design_matrix, which constructs a design matrix of b-splines in the sparse CSR format.

    A new method from_cubic in BSpline class allows to convert a CubicSpline object to BSpline object.

    scipy.linalg improvements

    scipy.linalg gained three new public array structure investigation functions. scipy.linalg.bandwidth returns information about the bandedness of an array and can be used to test for triangular structure discovery, while scipy.linalg.issymmetric and scipy.linalg.ishermitian test the array for exact and approximate symmetric/Hermitian structure.

    scipy.optimize improvements

    scipy.optimize.check_grad introduces two new optional keyword only arguments, direction and seed. direction can take values, 'all' (default), in which case all the one hot direction vectors will be used for verifying the input analytical gradient function and 'random', in which case a random direction vector will be used for the same purpose. seed (default is None) can be used for reproducing the return value of check_grad function. It will be used only when direction='random'.

    The scipy.optimize.minimize TNC method has been rewritten to use Cython bindings. This also fixes an issue with the callback altering the state of the optimization.

    Added optional parameters target_accept_rate and stepwise_factor for adapative step size adjustment in basinhopping.

    The epsilon argument to approx_fprime is now optional so that it may have a default value consistent with most other functions in scipy.optimize.

    scipy.signal improvements

    Add analog argument, default False, to zpk2sos, and add new pairing option 'minimal' to construct analog and minimal discrete SOS arrays. tf2sos uses zpk2sos; add analog argument here as well, and pass it on to zpk2sos.

    savgol_coeffs and savgol_filter now work for even window lengths.

    Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT and scipy.signal.ZoomFFT.

    scipy.sparse improvements

    An array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases. Please refer to the scipy.sparse docstring for more information.

    maximum_flow introduces optional keyword only argument, method which accepts either, 'edmonds-karp' (Edmonds Karp algorithm) or 'dinic' (Dinic's algorithm). Moreover, 'dinic' is used as default value for method which means that Dinic's algorithm is used for computing maximum flow unless specified. See, the comparison between the supported algorithms in this comment <https://github.com/scipy/scipy/pull/14358#issue-684212523>_.

    Parameters atol, btol now default to 1e-6 in scipy.sparse.linalg.lsmr to match with default values in scipy.sparse.linalg.lsqr.

    Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr.

    The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. For some problems, this may be faster and/or more accurate than the default, ARPACK.

    sparse.linalg iterative solvers now have a nonzero initial guess option, which may be specified as x0 = 'Mb'.

    The trace method has been added for sparse matrices.

    scipy.spatial improvements

    scipy.spatial.transform.Rotation now supports item assignment and has a new concatenate method.

    Add scipy.spatial.distance.kulczynski1 in favour of scipy.spatial.distance.kulsinski which will be deprecated in the next release.

    scipy.spatial.distance.minkowski now also supports 0<p<1.

    scipy.special improvements

    The new function scipy.special.log_expit computes the logarithm of the logistic sigmoid function. The function is formulated to provide accurate results for large positive and negative inputs, so it avoids the problems that would occur in the naive implementation log(expit(x)).

    A suite of five new functions for elliptic integrals: scipy.special.ellipr{c,d,f,g,j}. These are the Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>_, which have computational advantages over the classical Legendre integrals. Previous versions included some elliptic integrals from the Cephes library (scipy.special.ellip{k,km1,kinc,e,einc}) but was missing the integral of third kind (Legendre's Pi), which can be evaluated using the new Carlson functions. The new Carlson elliptic integral functions can be evaluated in the complex plane, whereas the Cephes library's functions are only defined for real inputs.

    Several defects in scipy.special.hyp2f1 have been corrected. Approximately correct values are now returned for z near exp(+-i*pi/3), fixing #8054 <https://github.com/scipy/scipy/issues/8054>. Evaluation for such z is now calculated through a series derived by López and Temme (2013) <https://arxiv.org/abs/1306.2046> that converges in these regions. In addition, degenerate cases with one or more of a, b, and/or c a non-positive integer are now handled in a manner consistent with mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>, which fixes #7340 <https://github.com/scipy/scipy/issues/7340>. These fixes were made as part of an effort to rewrite the Fortran 77 implementation of hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.

    scipy.stats improvements

    scipy.stats.qmc.LatinHypercube introduces two new optional keyword-only arguments, optimization and strength. optimization is either None or random-cd. In the latter, random permutations are performed to improve the centered discrepancy. strength is either 1 or 2. 1 corresponds to the classical LHS while 2 has better sub-projection properties. This construction is referred to as an orthogonal array based LHS of strength 2. In both cases, the output is still a LHS.

    scipy.stats.qmc.Halton is faster as the underlying Van der Corput sequence was ported to Cython.

    The alternative parameter was added to the kendalltau and somersd functions to allow one-sided hypothesis testing. Similarly, the masked versions of skewtest, kurtosistest, ttest_1samp, ttest_ind, and ttest_rel now also have an alternative parameter.

    Add scipy.stats.gzscore to calculate the geometrical z score.

    Random variate generators to sample from arbitrary univariate non-uniform continuous and discrete distributions have been added to the new scipy.stats.sampling submodule. Implementations of a C library UNU.RAN <http://statmath.wu.ac.at/software/unuran/>_ are used for performance. The generators added are:

    • TransformedDensityRejection
    • DiscreteAliasUrn
    • NumericalInversePolynomial
    • DiscreteGuideTable
    • SimpleRatioUniforms

    The binned_statistic set of functions now have improved performance for the std, min, max, and median statistic calculations.

    somersd and _tau_b now have faster Pythran-based implementations.

    Some general efficiency improvements to handling of nan values in several stats functions.

    Added the Tukey-Kramer test as scipy.stats.tukey_hsd.

    Improved performance of scipy.stats.argus rvs method.

    Added the parameter keepdims to scipy.stats.variation and prevent the undesirable return of a masked array from the function in some cases.

    permutation_test performs an exact or randomized permutation test of a given statistic on provided data.

    Deprecated features

    Clear split between public and private API

    SciPy has always documented what its public API consisted of in :ref:its API reference docs <scipy-api>, however there never was a clear split between public and private namespaces in the code base. In this release, all namespaces that were private but happened to miss underscores in their names have been deprecated. These include (as examples, there are many more):

    • scipy.signal.spline
    • scipy.ndimage.filters
    • scipy.ndimage.fourier
    • scipy.ndimage.measurements
    • scipy.ndimage.morphology
    • scipy.ndimage.interpolation
    • scipy.sparse.linalg.solve
    • scipy.sparse.linalg.eigen
    • scipy.sparse.linalg.isolve

    All functions and other objects in these namespaces that were meant to be public are accessible from their respective public namespace (e.g. scipy.signal). The design principle is that any public object must be accessible from a single namespace only; there are a few exceptions, mostly for historical reasons (e.g., stats and stats.distributions overlap). For other libraries aiming to provide a SciPy-compatible API, it is now unambiguous what namespace structure to follow. See gh-14360 <https://github.com/scipy/scipy/issues/14360>_ for more details.

    Other deprecations

    NumericalInverseHermite has been deprecated from scipy.stats and moved to the scipy.stats.sampling submodule. It now uses the C implementation of the UNU.RAN library so the result of methods like ppf may vary slightly. Parameter tol has been deprecated and renamed to u_resolution. The parameter max_intervals has also been deprecated and will be removed in a future release of SciPy.

    Backwards incompatible changes

    • SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features. For more details see here <https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html>_.
    • The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
    • The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.

    Other changes

    Some Fortran 77 code was modernized to be compatible with NAG's nagfor Fortran compiler (see, e.g., PR 13229 <https://github.com/scipy/scipy/pull/13229>_).

    threadpoolctl may now be used by our test suite to substantially improve the efficiency of parallel test suite runs.

    Authors

    • @endolith
    • adamadanandy +
    • akeemlh +
    • Anton Akhmerov
    • Marvin Albert +
    • alegresor +
    • Andrew Annex +
    • Pantelis Antonoudiou +
    • Ross Barnowski +
    • Christoph Baumgarten
    • Stephen Becker +
    • Nickolai Belakovski
    • Peter Bell
    • berberto +
    • Georgii Bocharov +
    • Evgeni Burovski
    • Matthias Bussonnier
    • CJ Carey
    • Justin Charlong +
    • Dennis Collaris +
    • David Cottrell +
    • cruyffturn +
    • da-woods +
    • Anirudh Dagar
    • Tiger Du +
    • Thomas Duvernay
    • Dani El-Ayyass +
    • Castedo Ellerman +
    • Donnie Erb +
    • Andreas Esders-Kopecky +
    • Livio F +
    • Isuru Fernando
    • Evelyn Fitzgerald +
    • Sara Fridovich-Keil +
    • Mark E Fuller +
    • Ralf Gommers
    • Kevin Richard Green +
    • guiweber +
    • Nitish Gupta +
    • h-vetinari
    • Matt Haberland
    • J. Hariharan +
    • Charles Harris
    • Trever Hines
    • Ian Hunt-Isaak +
    • ich +
    • Itrimel +
    • Jan-Hendrik Müller +
    • Jebby993 +
    • Evan W Jones +
    • Nathaniel Jones +
    • Jeffrey Kelling +
    • Malik Idrees Hasan Khan +
    • Sergey B Kirpichev
    • Kadatatlu Kishore +
    • Andrew Knyazev
    • Ravin Kumar +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Tim Leslie
    • lezcano +
    • Xingyu Liu
    • Christian Lorentzen
    • Lorenzo +
    • Smit Lunagariya +
    • Lv101Magikarp +
    • Yair M +
    • Cong Ma
    • Lorenzo Maffioli +
    • majiang +
    • Brian McFee +
    • Nicholas McKibben
    • John Speed Meyers +
    • millivolt9 +
    • Jarrod Millman
    • Harsh Mishra +
    • Boaz Mohar +
    • naelsondouglas +
    • Andrew Nelson
    • Nico Schlömer
    • Thomas Nowotny +
    • nullptr +
    • Teddy Ort +
    • Nick Papior
    • ParticularMiner +
    • Dima Pasechnik
    • Tirth Patel
    • Matti Picus
    • Ilhan Polat
    • Adrian Price-Whelan +
    • Quentin Barthélemy +
    • Sundar R +
    • Judah Rand +
    • Tyler Reddy
    • Renal-Of-Loon +
    • Frederic Renner +
    • Pamphile Roy
    • Bharath Saiguhan +
    • Atsushi Sakai
    • Eric Schanet +
    • Sebastian Wallkötter
    • serge-sans-paille
    • Reshama Shaikh +
    • Namami Shanker
    • Walter Simson +
    • Gagandeep Singh +
    • Leo C. Stein +
    • Albert Steppi
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Masayuki Takagi +
    • Mike Taves
    • Ben Thompson +
    • Bas van Beek
    • Jacob Vanderplas
    • Dhruv Vats +
    • H. Vetinari +
    • Thomas Viehmann +
    • Pauli Virtanen
    • Vlad +
    • Arthur Volant
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Josh Wilson
    • Haoyin Xu +
    • Rory Yorke
    • Egor Zemlyanoy
    • Gang Zhao +
    • 赵丰 (Zhao Feng) +

    A total of 133 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(307.03 KB)
    README(70.91 KB)
    scipy-1.8.0rc2-cp310-cp310-macosx_10_9_x86_64.whl(33.72 MB)
    scipy-1.8.0rc2-cp310-cp310-macosx_12_0_arm64.whl(27.64 MB)
    scipy-1.8.0rc2-cp310-cp310-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.36 MB)
    scipy-1.8.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.51 MB)
    scipy-1.8.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.63 MB)
    scipy-1.8.0rc2-cp310-cp310-win_amd64.whl(35.53 MB)
    scipy-1.8.0rc2-cp38-cp38-macosx_10_9_x86_64.whl(33.52 MB)
    scipy-1.8.0rc2-cp38-cp38-macosx_12_0_arm64.whl(27.53 MB)
    scipy-1.8.0rc2-cp38-cp38-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.05 MB)
    scipy-1.8.0rc2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(35.04 MB)
    scipy-1.8.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.55 MB)
    scipy-1.8.0rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(39.97 MB)
    scipy-1.8.0rc2-cp38-cp38-win32.whl(32.16 MB)
    scipy-1.8.0rc2-cp38-cp38-win_amd64.whl(35.46 MB)
    scipy-1.8.0rc2-cp39-cp39-macosx_10_9_x86_64.whl(33.68 MB)
    scipy-1.8.0rc2-cp39-cp39-macosx_12_0_arm64.whl(27.64 MB)
    scipy-1.8.0rc2-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl(53.31 MB)
    scipy-1.8.0rc2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(35.24 MB)
    scipy-1.8.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(37.36 MB)
    scipy-1.8.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(40.50 MB)
    scipy-1.8.0rc2-cp39-cp39-win32.whl(32.21 MB)
    scipy-1.8.0rc2-cp39-cp39-win_amd64.whl(35.51 MB)
    scipy-1.8.0rc2.tar.gz(36.42 MB)
    scipy-1.8.0rc2.tar.xz(27.31 MB)
    scipy-1.8.0rc2.zip(48.17 MB)
  • v1.8.0rc1(Dec 12, 2021)

    SciPy 1.8.0 Release Notes

    Note: SciPy 1.8.0 is not released yet!

    SciPy 1.8.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.8.x branch, and on adding new features on the master branch.

    This release requires Python 3.8+ and NumPy 1.17.3 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A sparse array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases.
    • The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'.
    • A new scipy.stats.sampling submodule that leverages the UNU.RAN C library to sample from arbitrary univariate non-uniform continuous and discrete distributions
    • All namespaces that were private but happened to miss underscores in their names have been deprecated.

    New features

    scipy.fft improvements

    Added an orthogonalize=None parameter to the real transforms in scipy.fft which controls whether the modified definition of DCT/DST is used without changing the overall scaling.

    scipy.fft backend registration is now smoother, operating with a single registration call and no longer requiring a context manager.

    scipy.integrate improvements

    scipy.integrate.quad_vec introduces a new optional keyword-only argument, args. args takes in a tuple of extra arguments if any (default is args=()), which is then internally used to pass into the callable function (needing these extra arguments) which we wish to integrate.

    scipy.interpolate improvements

    scipy.interpolate.BSpline has a new method, design_matrix, which constructs a design matrix of b-splines in the sparse CSR format.

    A new method from_cubic in BSpline class allows to convert a CubicSpline object to BSpline object.

    scipy.linalg improvements

    scipy.linalg gained three new public array structure investigation functions. scipy.linalg.bandwidth returns information about the bandedness of an array and can be used to test for triangular structure discovery, while scipy.linalg.issymmetric and scipy.linalg.ishermitian test the array for exact and approximate symmetric/Hermitian structure.

    scipy.optimize improvements

    scipy.optimize.check_grad introduces two new optional keyword only arguments, direction and seed. direction can take values, 'all' (default), in which case all the one hot direction vectors will be used for verifying the input analytical gradient function and 'random', in which case a random direction vector will be used for the same purpose. seed (default is None) can be used for reproducing the return value of check_grad function. It will be used only when direction='random'.

    The scipy.optimize.minimize TNC method has been rewritten to use Cython bindings. This also fixes an issue with the callback altering the state of the optimization.

    Added optional parameters target_accept_rate and stepwise_factor for adapative step size adjustment in basinhopping.

    The epsilon argument to approx_fprime is now optional so that it may have a default value consistent with most other functions in scipy.optimize.

    scipy.signal improvements

    Add analog argument, default False, to zpk2sos, and add new pairing option 'minimal' to construct analog and minimal discrete SOS arrays. tf2sos uses zpk2sos; add analog argument here as well, and pass it on to zpk2sos.

    savgol_coeffs and savgol_filter now work for even window lengths.

    Added the Chirp Z-transform and Zoom FFT available as scipy.signal.CZT and scipy.signal.ZoomFFT.

    scipy.sparse improvements

    An array API has been added for early testing and feedback; this work is ongoing, and users should expect minor API refinements over the next few releases. Please refer to the scipy.sparse docstring for more information.

    maximum_flow introduces optional keyword only argument, method which accepts either, 'edmonds-karp' (Edmonds Karp algorithm) or 'dinic' (Dinic's algorithm). Moreover, 'dinic' is used as default value for method which means that Dinic's algorithm is used for computing maximum flow unless specified. See, the comparison between the supported algorithms in this comment <https://github.com/scipy/scipy/pull/14358#issue-684212523>_.

    Parameters atol, btol now default to 1e-6 in scipy.sparse.linalg.lsmr to match with default values in scipy.sparse.linalg.lsqr.

    Add the Transpose-Free Quasi-Minimal Residual algorithm (TFQMR) for general nonsingular non-Hermitian linear systems in scipy.sparse.linalg.tfqmr.

    The sparse SVD library PROPACK is now vendored with SciPy, and an interface is exposed via scipy.sparse.svds with solver='PROPACK'. For some problems, this may be faster and/or more accurate than the default, ARPACK.

    sparse.linalg iterative solvers now have a nonzero initial guess option, which may be specified as x0 = 'Mb'.

    The trace method has been added for sparse matrices.

    scipy.spatial improvements

    scipy.spatial.transform.Rotation now supports item assignment and has a new concatenate method.

    Add scipy.spatial.distance.kulczynski1 in favour of scipy.spatial.distance.kulsinski which will be deprecated in the next release.

    scipy.spatial.distance.minkowski now also supports 0<p<1.

    scipy.special improvements

    The new function scipy.special.log_expit computes the logarithm of the logistic sigmoid function. The function is formulated to provide accurate results for large positive and negative inputs, so it avoids the problems that would occur in the naive implementation log(expit(x)).

    A suite of five new functions for elliptic integrals: scipy.special.ellipr{c,d,f,g,j}. These are the Carlson symmetric elliptic integrals <https://dlmf.nist.gov/19.16>_, which have computational advantages over the classical Legendre integrals. Previous versions included some elliptic integrals from the Cephes library (scipy.special.ellip{k,km1,kinc,e,einc}) but was missing the integral of third kind (Legendre's Pi), which can be evaluated using the new Carlson functions. The new Carlson elliptic integral functions can be evaluated in the complex plane, whereas the Cephes library's functions are only defined for real inputs.

    Several defects in scipy.special.hyp2f1 have been corrected. Approximately correct values are now returned for z near exp(+-i*pi/3), fixing #8054 <https://github.com/scipy/scipy/issues/8054>. Evaluation for such z is now calculated through a series derived by López and Temme (2013) <https://arxiv.org/abs/1306.2046> that converges in these regions. In addition, degenerate cases with one or more of a, b, and/or c a non-positive integer are now handled in a manner consistent with mpmath's hyp2f1 implementation <https://mpmath.org/doc/current/functions/hypergeometric.html>, which fixes #7340 <https://github.com/scipy/scipy/issues/7340>. These fixes were made as part of an effort to rewrite the Fortran 77 implementation of hyp2f1 in Cython piece by piece. This rewriting is now roughly 50% complete.

    scipy.stats improvements

    scipy.stats.qmc.LatinHypercube introduces two new optional keyword-only arguments, optimization and strength. optimization is either None or random-cd. In the latter, random permutations are performed to improve the centered discrepancy. strength is either 1 or 2. 1 corresponds to the classical LHS while 2 has better sub-projection properties. This construction is referred to as an orthogonal array based LHS of strength 2. In both cases, the output is still a LHS.

    scipy.stats.qmc.Halton is faster as the underlying Van der Corput sequence was ported to Cython.

    The alternative parameter was added to the kendalltau and somersd functions to allow one-sided hypothesis testing. Similarly, the masked versions of skewtest, kurtosistest, ttest_1samp, ttest_ind, and ttest_rel now also have an alternative parameter.

    Add scipy.stats.gzscore to calculate the geometrical z score.

    Random variate generators to sample from arbitrary univariate non-uniform continuous and discrete distributions have been added to the new scipy.stats.sampling submodule. Implementations of a C library UNU.RAN <http://statmath.wu.ac.at/software/unuran/>_ are used for performance. The generators added are:

    • TransformedDensityRejection
    • DiscreteAliasUrn
    • NumericalInversePolynomial
    • DiscreteGuideTable
    • SimpleRatioUniforms

    The binned_statistic set of functions now have improved performance for the std, min, max, and median statistic calculations.

    somersd and _tau_b now have faster Pythran-based implementations.

    Some general efficiency improvements to handling of nan values in several stats functions.

    Added the Tukey-Kramer test as scipy.stats.tukey_hsd.

    Improved performance of scipy.stats.argus rvs method.

    Added the parameter keepdims to scipy.stats.variation and prevent the undesirable return of a masked array from the function in some cases.

    permutation_test performs an exact or randomized permutation test of a given statistic on provided data.

    Deprecated features

    Clear split between public and private API

    SciPy has always documented what its public API consisted of in :ref:its API reference docs <scipy-api>, however there never was a clear split between public and private namespaces in the code base. In this release, all namespaces that were private but happened to miss underscores in their names have been deprecated. These include (as examples, there are many more):

    • scipy.signal.spline
    • scipy.ndimage.filters
    • scipy.ndimage.fourier
    • scipy.ndimage.measurements
    • scipy.ndimage.morphology
    • scipy.ndimage.interpolation
    • scipy.sparse.linalg.solve
    • scipy.sparse.linalg.eigen
    • scipy.sparse.linalg.isolve

    All functions and other objects in these namespaces that were meant to be public are accessible from their respective public namespace (e.g. scipy.signal). The design principle is that any public object must be accessible from a single namespace only; there are a few exceptions, mostly for historical reasons (e.g., stats and stats.distributions overlap). For other libraries aiming to provide a SciPy-compatible API, it is now unambiguous what namespace structure to follow. See gh-14360 <https://github.com/scipy/scipy/issues/14360>_ for more details.

    Other deprecations

    NumericalInverseHermite has been deprecated from scipy.stats and moved to the scipy.stats.sampling submodule. It now uses the C implementation of the UNU.RAN library so the result of methods like ppf may vary slightly. Parameter tol has been deprecated and renamed to u_resolution. The parameter max_intervals has also been deprecated and will be removed in a future release of SciPy.

    Backwards incompatible changes

    • SciPy has raised the minimum compiler versions to GCC 6.3 on linux and VS2019 on windows. In particular, this means that SciPy may now use C99 and C++14 features. For more details see here <https://docs.scipy.org/doc/scipy/reference/dev/toolchain.html>_.
    • The result for empty bins for scipy.stats.binned_statistic with the builtin 'std' metric is now nan, for consistency with np.std.
    • The function scipy.spatial.distance.wminkowski has been removed. To achieve the same results as before, please use the minkowski distance function with the (optional) w= keyword-argument for the given weight.

    Other changes

    Some Fortran 77 code was modernized to be compatible with NAG's nagfor Fortran compiler (see, e.g., PR 13229 <https://github.com/scipy/scipy/pull/13229>_).

    threadpoolctl may now be used by our test suite to substantially improve the efficiency of parallel test suite runs.

    Authors

    • @endolith
    • adamadanandy +
    • akeemlh +
    • Anton Akhmerov
    • Marvin Albert +
    • alegresor +
    • Andrew Annex +
    • Pantelis Antonoudiou +
    • Ross Barnowski +
    • Christoph Baumgarten
    • Stephen Becker +
    • Nickolai Belakovski
    • Peter Bell
    • berberto +
    • Georgii Bocharov +
    • Evgeni Burovski
    • Matthias Bussonnier
    • CJ Carey
    • Justin Charlong +
    • Dennis Collaris +
    • David Cottrell +
    • cruyffturn +
    • da-woods +
    • Anirudh Dagar
    • Tiger Du +
    • Thomas Duvernay
    • Dani El-Ayyass +
    • Castedo Ellerman +
    • Donnie Erb +
    • Andreas Esders-Kopecky +
    • Livio F +
    • Isuru Fernando
    • Evelyn Fitzgerald +
    • Sara Fridovich-Keil +
    • Mark E Fuller +
    • Ralf Gommers
    • Kevin Richard Green +
    • guiweber +
    • Nitish Gupta +
    • h-vetinari
    • Matt Haberland
    • J. Hariharan +
    • Charles Harris
    • Trever Hines
    • Ian Hunt-Isaak +
    • ich +
    • Itrimel +
    • Jan-Hendrik Müller +
    • Jebby993 +
    • Evan W Jones +
    • Nathaniel Jones +
    • Jeffrey Kelling +
    • Malik Idrees Hasan Khan +
    • Sergey B Kirpichev
    • Kadatatlu Kishore +
    • Andrew Knyazev
    • Ravin Kumar +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Tim Leslie
    • lezcano +
    • Xingyu Liu
    • Christian Lorentzen
    • Lorenzo +
    • Smit Lunagariya +
    • Lv101Magikarp +
    • Yair M +
    • Cong Ma
    • Lorenzo Maffioli +
    • majiang +
    • Brian McFee +
    • Nicholas McKibben
    • John Speed Meyers +
    • millivolt9 +
    • Jarrod Millman
    • Harsh Mishra +
    • Boaz Mohar +
    • naelsondouglas +
    • Andrew Nelson
    • Nico Schlömer
    • Thomas Nowotny +
    • nullptr +
    • Teddy Ort +
    • Nick Papior
    • ParticularMiner +
    • Dima Pasechnik
    • Tirth Patel
    • Matti Picus
    • Ilhan Polat
    • Adrian Price-Whelan +
    • Quentin Barthélemy +
    • Sundar R +
    • Judah Rand +
    • Tyler Reddy
    • Renal-Of-Loon +
    • Frederic Renner +
    • Pamphile Roy
    • Bharath Saiguhan +
    • Atsushi Sakai
    • Eric Schanet +
    • Sebastian Wallkötter
    • serge-sans-paille
    • Reshama Shaikh +
    • Namami Shanker
    • Walter Simson +
    • Gagandeep Singh +
    • Leo C. Stein +
    • Albert Steppi
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Mike Taves
    • Ben Thompson +
    • Bas van Beek
    • Jacob Vanderplas
    • Dhruv Vats +
    • H. Vetinari +
    • Thomas Viehmann +
    • Pauli Virtanen
    • Vlad +
    • Arthur Volant
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Josh Wilson
    • Haoyin Xu +
    • Rory Yorke
    • Egor Zemlyanoy
    • Gang Zhao +
    • 赵丰 (Zhao Feng) +

    A total of 132 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(302.08 KB)
    README(69.72 KB)
    scipy-1.8.0rc1-cp310-cp310-macosx_10_9_x86_64.whl(92.06 MB)
    scipy-1.8.0rc1-cp310-cp310-macosx_12_0_arm64.whl(85.41 MB)
    scipy-1.8.0rc1-cp310-cp310-macosx_12_0_universal2.whl(111.13 MB)
    scipy-1.8.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(97.34 MB)
    scipy-1.8.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(98.40 MB)
    scipy-1.8.0rc1-cp310-cp310-win_amd64.whl(102.14 MB)
    scipy-1.8.0rc1-cp38-cp38-macosx_12_0_arm64.whl(86.80 MB)
    scipy-1.8.0rc1-cp38-cp38-macosx_12_0_universal2.whl(112.88 MB)
    scipy-1.8.0rc1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(92.81 MB)
    scipy-1.8.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(95.32 MB)
    scipy-1.8.0rc1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(97.28 MB)
    scipy-1.8.0rc1-cp38-cp38-win32.whl(101.03 MB)
    scipy-1.8.0rc1-cp38-cp38-win_amd64.whl(104.34 MB)
    scipy-1.8.0rc1-cp39-cp39-macosx_10_9_x86_64.whl(93.51 MB)
    scipy-1.8.0rc1-cp39-cp39-macosx_12_0_arm64.whl(85.41 MB)
    scipy-1.8.0rc1-cp39-cp39-macosx_12_0_universal2.whl(111.08 MB)
    scipy-1.8.0rc1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(95.07 MB)
    scipy-1.8.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(97.19 MB)
    scipy-1.8.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(98.26 MB)
    scipy-1.8.0rc1-cp39-cp39-win32.whl(96.55 MB)
    scipy-1.8.0rc1-cp39-cp39-win_amd64.whl(99.85 MB)
    scipy-1.8.0rc1.tar.gz(84.41 MB)
    scipy-1.8.0rc1.tar.xz(65.63 MB)
  • v1.7.3(Nov 24, 2021)

    SciPy 1.7.3 Release Notes

    SciPy 1.7.3 is a bug-fix release that provides binary wheels for MacOS arm64 with Python 3.8, 3.9, and 3.10. The MacOS arm64 wheels are only available for MacOS version 12.0 and greater, as explained in Issue 14688.

    Authors

    • Anirudh Dagar
    • Ralf Gommers
    • Tyler Reddy
    • Pamphile Roy
    • Olivier Grisel
    • Isuru Fernando

    A total of 6 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(7.66 KB)
    README(7.96 KB)
    scipy-1.7.3-cp310-cp310-macosx_10_9_x86_64.whl(31.68 MB)
    scipy-1.7.3-cp310-cp310-macosx_12_0_arm64.whl(25.77 MB)
    scipy-1.7.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(35.06 MB)
    scipy-1.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(38.07 MB)
    scipy-1.7.3-cp310-cp310-win_amd64.whl(32.70 MB)
    scipy-1.7.3-cp37-cp37m-macosx_10_9_x86_64.whl(31.42 MB)
    scipy-1.7.3-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl(32.19 MB)
    scipy-1.7.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl(36.35 MB)
    scipy-1.7.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(34.42 MB)
    scipy-1.7.3-cp37-cp37m-win32.whl(29.22 MB)
    scipy-1.7.3-cp37-cp37m-win_amd64.whl(32.52 MB)
    scipy-1.7.3-cp38-cp38-macosx_10_9_x86_64.whl(31.49 MB)
    scipy-1.7.3-cp38-cp38-macosx_12_0_arm64.whl(25.67 MB)
    scipy-1.7.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(32.72 MB)
    scipy-1.7.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(35.10 MB)
    scipy-1.7.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(37.43 MB)
    scipy-1.7.3-cp38-cp38-win32.whl(29.31 MB)
    scipy-1.7.3-cp38-cp38-win_amd64.whl(32.64 MB)
    scipy-1.7.3-cp39-cp39-macosx_10_9_x86_64.whl(31.64 MB)
    scipy-1.7.3-cp39-cp39-macosx_12_0_arm64.whl(25.77 MB)
    scipy-1.7.3-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(32.92 MB)
    scipy-1.7.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(34.91 MB)
    scipy-1.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(37.95 MB)
    scipy-1.7.3-cp39-cp39-win32.whl(29.35 MB)
    scipy-1.7.3-cp39-cp39-win_amd64.whl(32.68 MB)
    scipy-1.7.3.tar.gz(34.43 MB)
    scipy-1.7.3.tar.xz(26.09 MB)
    scipy-1.7.3.zip(45.49 MB)
  • v1.7.2(Nov 6, 2021)

    SciPy 1.7.2 Release Notes

    SciPy 1.7.2 is a bug-fix release with no new features compared to 1.7.1. Notably, the release includes wheels for Python 3.10, and wheels are now built with a newer version of OpenBLAS, 0.3.17. Python 3.10 wheels are provided for MacOS x86_64 (thin, not universal2 or arm64 at this time), and Windows/Linux 64-bit. Many wheels are now built with newer versions of manylinux, which may require newer versions of pip.

    Authors

    • Peter Bell
    • da-woods +
    • Isuru Fernando
    • Ralf Gommers
    • Matt Haberland
    • Nicholas McKibben
    • Ilhan Polat
    • Judah Rand +
    • Tyler Reddy
    • Pamphile Roy
    • Charles Harris
    • Matti Picus
    • Hugo van Kemenade
    • Jacob Vanderplas

    A total of 14 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(9.60 KB)
    README(9.80 KB)
    scipy-1.7.2-1-cp310-cp310-win_amd64.whl(32.70 MB)
    scipy-1.7.2-cp310-cp310-macosx_10_9_x86_64.whl(31.68 MB)
    scipy-1.7.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(35.06 MB)
    scipy-1.7.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(38.07 MB)
    scipy-1.7.2-cp37-cp37m-macosx_10_9_x86_64.whl(31.42 MB)
    scipy-1.7.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl(32.19 MB)
    scipy-1.7.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl(36.38 MB)
    scipy-1.7.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(34.42 MB)
    scipy-1.7.2-cp37-cp37m-win32.whl(29.22 MB)
    scipy-1.7.2-cp37-cp37m-win_amd64.whl(32.52 MB)
    scipy-1.7.2-cp38-cp38-macosx_10_9_x86_64.whl(31.49 MB)
    scipy-1.7.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl(32.72 MB)
    scipy-1.7.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(35.10 MB)
    scipy-1.7.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(37.43 MB)
    scipy-1.7.2-cp38-cp38-win32.whl(29.31 MB)
    scipy-1.7.2-cp38-cp38-win_amd64.whl(32.64 MB)
    scipy-1.7.2-cp39-cp39-macosx_10_9_x86_64.whl(31.64 MB)
    scipy-1.7.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl(32.92 MB)
    scipy-1.7.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(34.91 MB)
    scipy-1.7.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl(37.95 MB)
    scipy-1.7.2-cp39-cp39-win32.whl(29.35 MB)
    scipy-1.7.2-cp39-cp39-win_amd64.whl(32.68 MB)
    scipy-1.7.2.tar.gz(34.43 MB)
    scipy-1.7.2.tar.xz(26.09 MB)
    scipy-1.7.2.zip(45.49 MB)
  • v1.7.1(Aug 2, 2021)

    SciPy 1.7.1 Release Notes

    SciPy 1.7.1 is a bug-fix release with no new features compared to 1.7.0.

    Authors

    • Peter Bell
    • Evgeni Burovski
    • Justin Charlong +
    • Ralf Gommers
    • Matti Picus
    • Tyler Reddy
    • Pamphile Roy
    • Sebastian Wallkötter
    • Arthur Volant

    A total of 9 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(6.51 KB)
    README(7.74 KB)
    scipy-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl(31.07 MB)
    scipy-1.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.99 MB)
    scipy-1.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl(24.21 MB)
    scipy-1.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.19 MB)
    scipy-1.7.1-cp37-cp37m-win32.whl(28.98 MB)
    scipy-1.7.1-cp37-cp37m-win_amd64.whl(32.05 MB)
    scipy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl(31.12 MB)
    scipy-1.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(26.09 MB)
    scipy-1.7.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl(24.14 MB)
    scipy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.05 MB)
    scipy-1.7.1-cp38-cp38-win32.whl(29.09 MB)
    scipy-1.7.1-cp38-cp38-win_amd64.whl(32.17 MB)
    scipy-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl(31.27 MB)
    scipy-1.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(26.08 MB)
    scipy-1.7.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl(24.25 MB)
    scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.13 MB)
    scipy-1.7.1-cp39-cp39-win32.whl(29.11 MB)
    scipy-1.7.1-cp39-cp39-win_amd64.whl(32.20 MB)
    scipy-1.7.1.tar.gz(34.43 MB)
    scipy-1.7.1.tar.xz(26.09 MB)
    scipy-1.7.1.zip(45.48 MB)
  • v1.7.0(Jun 20, 2021)

    SciPy 1.7.0 Release Notes

    SciPy 1.7.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.7.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new submodule for quasi-Monte Carlo, scipy.stats.qmc, was added
    • The documentation design was updated to use the same PyData-Sphinx theme as NumPy and other ecosystem libraries.
    • We now vendor and leverage the Boost C++ library to enable numerous improvements for long-standing weaknesses in scipy.stats
    • scipy.stats has six new distributions, eight new (or overhauled) hypothesis tests, a new function for bootstrapping, a class that enables fast random variate sampling and percentile point function evaluation, and many other enhancements.
    • cdist and pdist distance calculations are faster for several metrics, especially weighted cases, thanks to a rewrite to a new C++ backend framework
    • A new class for radial basis function interpolation, RBFInterpolator, was added to address issues with the Rbf class.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of the improvements to scipy.stats.

    New features

    scipy.cluster improvements

    An optional argument, seed, has been added to kmeans and kmeans2 to set the random generator and random state.

    scipy.interpolate improvements

    Improved input validation and error messages for fitpack.bispev and fitpack.parder for scenarios that previously caused substantial confusion for users.

    The class RBFInterpolator was added to supersede the Rbf class. The new class has usage that more closely follows other interpolator classes, corrects sign errors that caused unexpected smoothing behavior, includes polynomial terms in the interpolant (which are necessary for some RBF choices), and supports interpolation using only the k-nearest neighbors for memory efficiency.

    scipy.linalg improvements

    An LAPACK wrapper was added for access to the tgexc subroutine.

    scipy.ndimage improvements

    scipy.ndimage.affine_transform is now able to infer the output_shape from the out array.

    scipy.optimize improvements

    The optional parameter bounds was added to _minimize_neldermead to support bounds constraints for the Nelder-Mead solver.

    trustregion methods trust-krylov, dogleg and trust-ncg can now estimate hess by finite difference using one of ["2-point", "3-point", "cs"].

    halton was added as a sampling_method in scipy.optimize.shgo. sobol was fixed and is now using scipy.stats.qmc.Sobol.

    halton and sobol were added as init methods in scipy.optimize.differential_evolution.

    differential_evolution now accepts an x0 parameter to provide an initial guess for the minimization.

    least_squares has a modest performance improvement when SciPy is built with Pythran transpiler enabled.

    When linprog is used with method 'highs', 'highs-ipm', or 'highs-ds', the result object now reports the marginals (AKA shadow prices, dual values) and residuals associated with each constraint.

    scipy.signal improvements

    get_window supports general_cosine and general_hamming window functions.

    scipy.signal.medfilt2d now releases the GIL where appropriate to enable performance gains via multithreaded calculations.

    scipy.sparse improvements

    Addition of dia_matrix sparse matrices is now faster.

    scipy.spatial improvements

    distance.cdist and distance.pdist performance has greatly improved for certain weighted metrics. Namely: minkowski, euclidean, chebyshev, canberra, and cityblock.

    Modest performance improvements for many of the unweighted cdist and pdist metrics noted above.

    The parameter seed was added to scipy.spatial.vq.kmeans and scipy.spatial.vq.kmeans2.

    The parameters axis and keepdims where added to scipy.spatial.distance.jensenshannon.

    The rotation methods from_rotvec and as_rotvec now accept a degrees argument to specify usage of degrees instead of radians.

    scipy.special improvements

    Wright's generalized Bessel function for positive arguments was added as scipy.special.wright_bessel.

    An implementation of the inverse of the Log CDF of the Normal Distribution is now available via scipy.special.ndtri_exp.

    scipy.stats improvements

    Hypothesis Tests

    The Mann-Whitney-Wilcoxon test, mannwhitneyu, has been rewritten. It now supports n-dimensional input, an exact test method when there are no ties, and improved documentation. Please see "Other changes" for adjustments to default behavior.

    The new function scipy.stats.binomtest replaces scipy.stats.binom_test. The new function returns an object that calculates a confidence intervals of the proportion parameter. Also, performance was improved from O(n) to O(log(n)) by using binary search.

    The two-sample version of the Cramer-von Mises test is implemented in scipy.stats.cramervonmises_2samp.

    The Alexander-Govern test is implemented in the new function scipy.stats.alexandergovern.

    The new functions scipy.stats.barnard_exact and scipy.stats. boschloo_exact respectively perform Barnard's exact test and Boschloo's exact test for 2x2 contingency tables.

    The new function scipy.stats.page_trend_test performs Page's test for ordered alternatives.

    The new function scipy.stats.somersd performs Somers' D test for ordinal association between two variables.

    An option, permutations, has been added in scipy.stats.ttest_ind to perform permutation t-tests. A trim option was also added to perform a trimmed (Yuen's) t-test.

    The alternative parameter was added to the skewtest, kurtosistest, ranksums, mood, ansari, linregress, and spearmanr functions to allow one-sided hypothesis testing.

    Sample statistics

    The new function scipy.stats.differential_entropy estimates the differential entropy of a continuous distribution from a sample.

    The boxcox and boxcox_normmax now allow the user to control the optimizer used to minimize the negative log-likelihood function.

    A new function scipy.stats.contingency.relative_risk calculates the relative risk, or risk ratio, of a 2x2 contingency table. The object returned has a method to compute the confidence interval of the relative risk.

    Performance improvements in the skew and kurtosis functions achieved by removal of repeated/redundant calculations.

    Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd.

    The new function scipy.stats.contingency.association computes several measures of association for a contingency table: Pearsons contingency coefficient, Cramer's V, and Tschuprow's T.

    The parameter nan_policy was added to scipy.stats.zmap to provide options for handling the occurrence of nan in the input data.

    The parameter ddof was added to scipy.stats.variation and scipy.stats.mstats.variation.

    The parameter weights was added to scipy.stats.gmean.

    Statistical Distributions

    We now vendor and leverage the Boost C++ library to address a number of previously reported issues in stats. Notably, beta, binom, nbinom now have Boost backends, and it is straightforward to leverage the backend for additional functions.

    The skew Cauchy probability distribution has been implemented as scipy.stats.skewcauchy.

    The Zipfian probability distribution has been implemented as scipy.stats.zipfian.

    The new distributions nchypergeom_fisher and nchypergeom_wallenius implement the Fisher and Wallenius versions of the noncentral hypergeometric distribution, respectively.

    The generalized hyperbolic distribution was added in scipy.stats.genhyperbolic.

    The studentized range distribution was added in scipy.stats.studentized_range.

    scipy.stats.argus now has improved handling for small parameter values.

    Better argument handling/preparation has resulted in performance improvements for many distributions.

    The cosine distribution has added ufuncs for ppf, cdf, sf, and isf methods including numerical precision improvements at the edges of the support of the distribution.

    An option to fit the distribution to data by the method of moments has been added to the fit method of the univariate continuous distributions.

    Other

    scipy.stats.bootstrap has been added to allow estimation of the confidence interval and standard error of a statistic.

    The new function scipy.stats.contingency.crosstab computes a contingency table (i.e. a table of counts of unique entries) for the given data.

    scipy.stats.NumericalInverseHermite enables fast random variate sampling and percentile point function evaluation of an arbitrary univariate statistical distribution.

    New scipy.stats.qmc module

    This new module provides Quasi-Monte Carlo (QMC) generators and associated helper functions.

    It provides a generic class scipy.stats.qmc.QMCEngine which defines a QMC engine/sampler. An engine is state aware: it can be continued, advanced and reset. 3 base samplers are available:

    • scipy.stats.qmc.Sobol the well known Sobol low discrepancy sequence. Several warnings have been added to guide the user into properly using this sampler. The sequence is scrambled by default.
    • scipy.stats.qmc.Halton: Halton low discrepancy sequence. The sequence is scrambled by default.
    • scipy.stats.qmc.LatinHypercube: plain LHS design.

    And 2 special samplers are available:

    • scipy.stats.qmc.MultinomialQMC: sampling from a multinomial distribution using any of the base scipy.stats.qmc.QMCEngine.
    • scipy.stats.qmc.MultivariateNormalQMC: sampling from a multivariate Normal using any of the base scipy.stats.qmc.QMCEngine.

    The module also provide the following helpers:

    • scipy.stats.qmc.discrepancy: assess the quality of a set of points in terms of space coverage.
    • scipy.stats.qmc.update_discrepancy: can be used in an optimization loop to construct a good set of points.
    • scipy.stats.qmc.scale: easily scale a set of points from (to) the unit interval to (from) a given range.

    Deprecated features

    scipy.linalg deprecations

    • scipy.linalg.pinv2 is deprecated and its functionality is completely subsumed into scipy.linalg.pinv
    • Both rcond, cond keywords of scipy.linalg.pinv and scipy.linalg.pinvh were not working and now are deprecated. They are now replaced with functioning atol and rtol keywords with clear usage.

    scipy.spatial deprecations

    • scipy.spatial.distance metrics expect 1d input vectors but will call np.squeeze on their inputs to accept any extra length-1 dimensions. That behaviour is now deprecated.

    Other changes

    We now accept and leverage performance improvements from the ahead-of-time Python-to-C++ transpiler, Pythran, which can be optionally disabled (via export SCIPY_USE_PYTHRAN=0) but is enabled by default at build time.

    There are two changes to the default behavior of scipy.stats.mannwhitenyu:

    • For years, use of the default alternative=None was deprecated; explicit alternative specification was required. Use of the new default value of alternative, "two-sided", is now permitted.
    • Previously, all p-values were based on an asymptotic approximation. Now, for small samples without ties, the p-values returned are exact by default.

    Support has been added for PEP 621 (project metadata in pyproject.toml)

    We now support a Gitpod environment to reduce the barrier to entry for SciPy development; for more details see :ref:quickstart-gitpod.

    Authors

    • @endolith
    • Jelle Aalbers +
    • Adam +
    • Tania Allard +
    • Sven Baars +
    • Max Balandat +
    • baumgarc +
    • Christoph Baumgarten
    • Peter Bell
    • Lilian Besson
    • Robinson Besson +
    • Max Bolingbroke
    • Blair Bonnett +
    • Jordão Bragantini
    • Harm Buisman +
    • Evgeni Burovski
    • Matthias Bussonnier
    • Dominic C
    • CJ Carey
    • Ramón Casero +
    • Chachay +
    • charlotte12l +
    • Benjamin Curtice Corbett +
    • Falcon Dai +
    • Ian Dall +
    • Terry Davis
    • droussea2001 +
    • DWesl +
    • dwight200 +
    • Thomas J. Fan +
    • Joseph Fox-Rabinovitz
    • Max Frei +
    • Laura Gutierrez Funderburk +
    • gbonomib +
    • Matthias Geier +
    • Pradipta Ghosh +
    • Ralf Gommers
    • Evan H +
    • h-vetinari
    • Matt Haberland
    • Anselm Hahn +
    • Alex Henrie
    • Piet Hessenius +
    • Trever Hines +
    • Elisha Hollander +
    • Stephan Hoyer
    • Tom Hu +
    • Kei Ishikawa +
    • Julien Jerphanion
    • Robert Kern
    • Shashank KS +
    • Peter Mahler Larsen
    • Eric Larson
    • Cheng H. Lee +
    • Gregory R. Lee
    • Jean-Benoist Leger +
    • lgfunderburk +
    • liam-o-marsh +
    • Xingyu Liu +
    • Alex Loftus +
    • Christian Lorentzen +
    • Cong Ma
    • Marc +
    • MarkPundurs +
    • Markus Löning +
    • Liam Marsh +
    • Nicholas McKibben
    • melissawm +
    • Jamie Morton
    • Andrew Nelson
    • Nikola Forró
    • Tor Nordam +
    • Olivier Gauthé +
    • Rohit Pandey +
    • Avanindra Kumar Pandeya +
    • Tirth Patel
    • paugier +
    • Alex H. Wagner, PhD +
    • Jeff Plourde +
    • Ilhan Polat
    • pranavrajpal +
    • Vladyslav Rachek
    • Bharat Raghunathan
    • Recursing +
    • Tyler Reddy
    • Lucas Roberts
    • Gregor Robinson +
    • Pamphile Roy +
    • Atsushi Sakai
    • Benjamin Santos
    • Martin K. Scherer +
    • Thomas Schmelzer +
    • Daniel Scott +
    • Sebastian Wallkötter +
    • serge-sans-paille +
    • Namami Shanker +
    • Masashi Shibata +
    • Alexandre de Siqueira +
    • Albert Steppi +
    • Adam J. Stewart +
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Mike Taves
    • Dan Temkin +
    • Nicolas Tessore +
    • tsubota20 +
    • Robert Uhl
    • christos val +
    • Bas van Beek +
    • Ashutosh Varma +
    • Jose Vazquez +
    • Sebastiano Vigna
    • Aditya Vijaykumar
    • VNMabus
    • Arthur Volant +
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Anreas Weh
    • Josh Wilson
    • Rory Yorke
    • Egor Zemlyanoy
    • Marc Zoeller +
    • zoj613 +
    • 秋纫 +

    A total of 126 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(368.35 KB)
    README(78.35 KB)
    scipy-1.7.0-cp37-cp37m-macosx_10_9_x86_64.whl(30.40 MB)
    scipy-1.7.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.90 MB)
    scipy-1.7.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl(24.21 MB)
    scipy-1.7.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.18 MB)
    scipy-1.7.0-cp37-cp37m-win32.whl(28.96 MB)
    scipy-1.7.0-cp37-cp37m-win_amd64.whl(32.03 MB)
    scipy-1.7.0-cp38-cp38-macosx_10_9_x86_64.whl(30.46 MB)
    scipy-1.7.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.99 MB)
    scipy-1.7.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl(24.13 MB)
    scipy-1.7.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.04 MB)
    scipy-1.7.0-cp38-cp38-win32.whl(29.09 MB)
    scipy-1.7.0-cp38-cp38-win_amd64.whl(32.16 MB)
    scipy-1.7.0-cp39-cp39-macosx_10_9_x86_64.whl(30.61 MB)
    scipy-1.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(26.00 MB)
    scipy-1.7.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl(24.24 MB)
    scipy-1.7.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.12 MB)
    scipy-1.7.0-cp39-cp39-win32.whl(29.10 MB)
    scipy-1.7.0-cp39-cp39-win_amd64.whl(32.18 MB)
    scipy-1.7.0.tar.gz(34.42 MB)
    scipy-1.7.0.tar.xz(26.09 MB)
    scipy-1.7.0.zip(45.48 MB)
  • v1.7.0rc2(Jun 14, 2021)

    SciPy 1.7.0 Release Notes

    Note: Scipy 1.7.0 is not released yet!

    SciPy 1.7.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.7.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new submodule for quasi-Monte Carlo, scipy.stats.qmc, was added
    • The documentation design was updated to use the same PyData-Sphinx theme as other NumFOCUS packages like NumPy.
    • We now vendor and leverage the Boost C++ library to enable numerous improvements for long-standing weaknesses in scipy.stats
    • scipy.stats has six new distributions, eight new (or overhauled) hypothesis tests, a new function for bootstrapping, a class that enables fast random variate sampling and percentile point function evaluation, and many other enhancements.
    • cdist and pdist distance calculations are faster for several metrics, especially weighted cases, thanks to a rewrite to a new C++ backend framework
    • A new class for radial basis function interpolation, RBFInterpolator, was added to address issues with the Rbf class.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of the improvements to scipy.stats.

    New features

    scipy.cluster improvements

    An optional argument, seed, has been added to kmeans and kmeans2 to set the random generator and random state.

    scipy.interpolate improvements

    Improved input validation and error messages for fitpack.bispev and fitpack.parder for scenarios that previously caused substantial confusion for users.

    The class RBFInterpolator was added to supersede the Rbf class. The new class has usage that more closely follows other interpolator classes, corrects sign errors that caused unexpected smoothing behavior, includes polynomial terms in the interpolant (which are necessary for some RBF choices), and supports interpolation using only the k-nearest neighbors for memory efficiency.

    scipy.linalg improvements

    An LAPACK wrapper was added for access to the tgexc subroutine.

    scipy.ndimage improvements

    scipy.ndimage.affine_transform is now able to infer the output_shape from the out array.

    scipy.optimize improvements

    The optional parameter bounds was added to _minimize_neldermead to support bounds constraints for the Nelder-Mead solver.

    trustregion methods trust-krylov, dogleg and trust-ncg can now estimate hess by finite difference using one of ["2-point", "3-point", "cs"].

    halton was added as a sampling_method in scipy.optimize.shgo. sobol was fixed and is now using scipy.stats.qmc.Sobol.

    halton and sobol were added as init methods in scipy.optimize.differential_evolution.

    differential_evolution now accepts an x0 parameter to provide an initial guess for the minimization.

    least_squares has a modest performance improvement when SciPy is built with Pythran transpiler enabled.

    When linprog is used with method 'highs', 'highs-ipm', or 'highs-ds', the result object now reports the marginals (AKA shadow prices, dual values) and residuals associated with each constraint.

    scipy.signal improvements

    get_window supports general_cosine and general_hamming window functions.

    scipy.signal.medfilt2d now releases the GIL where appropriate to enable performance gains via multithreaded calculations.

    scipy.sparse improvements

    Addition of dia_matrix sparse matrices is now faster.

    scipy.spatial improvements

    distance.cdist and distance.pdist performance has greatly improved for certain weighted metrics. Namely: minkowski, euclidean, chebyshev, canberra, and cityblock.

    Modest performance improvements for many of the unweighted cdist and pdist metrics noted above.

    The parameter seed was added to scipy.spatial.vq.kmeans and scipy.spatial.vq.kmeans2.

    The parameters axis and keepdims where added to scipy.spatial.distance.jensenshannon.

    The rotation methods from_rotvec and as_rotvec now accept a degrees argument to specify usage of degrees instead of radians.

    scipy.special improvements

    Wright's generalized Bessel function for positive arguments was added as scipy.special.wright_bessel.

    An implementation of the inverse of the Log CDF of the Normal Distribution is now available via scipy.special.ndtri_exp.

    scipy.stats improvements

    Hypothesis Tests

    The Mann-Whitney-Wilcoxon test, mannwhitneyu, has been rewritten. It now supports n-dimensional input, an exact test method when there are no ties, and improved documentation. Please see "Other changes" for adjustments to default behavior.

    The new function scipy.stats.binomtest replaces scipy.stats.binom_test. The new function returns an object that calculates a confidence intervals of the proportion parameter. Also, performance was improved from O(n) to O(log(n)) by using binary search.

    The two-sample version of the Cramer-von Mises test is implemented in scipy.stats.cramervonmises_2samp.

    The Alexander-Govern test is implemented in the new function scipy.stats.alexandergovern.

    The new functions scipy.stats.barnard_exact and scipy.stats. boschloo_exact respectively perform Barnard's exact test and Boschloo's exact test for 2x2 contingency tables.

    The new function scipy.stats.page_trend_test performs Page's test for ordered alternatives.

    The new function scipy.stats.somersd performs Somers' D test for ordinal association between two variables.

    An option, permutations, has been added in scipy.stats.ttest_ind to perform permutation t-tests. A trim option was also added to perform a trimmed (Yuen's) t-test.

    The alternative parameter was added to the skewtest, kurtosistest, ranksums, mood, ansari, linregress, and spearmanr functions to allow one-sided hypothesis testing.

    Sample statistics

    The new function scipy.stats.differential_entropy estimates the differential entropy of a continuous distribution from a sample.

    The boxcox and boxcox_normmax now allow the user to control the optimizer used to minimize the negative log-likelihood function.

    A new function scipy.stats.contingency.relative_risk calculates the relative risk, or risk ratio, of a 2x2 contingency table. The object returned has a method to compute the confidence interval of the relative risk.

    Performance improvements in the skew and kurtosis functions achieved by removal of repeated/redundant calculations.

    Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd.

    The new function scipy.stats.contingency.association computes several measures of association for a contingency table: Pearsons contingency coefficient, Cramer's V, and Tschuprow's T.

    The parameter nan_policy was added to scipy.stats.zmap to provide options for handling the occurrence of nan in the input data.

    The parameter ddof was added to scipy.stats.variation and scipy.stats.mstats.variation.

    The parameter weights was added to scipy.stats.gmean.

    Statistical Distributions

    We now vendor and leverage the Boost C++ library to address a number of previously reported issues in stats. Notably, beta, binom, nbinom now have Boost backends, and it is straightforward to leverage the backend for additional functions.

    The skew Cauchy probability distribution has been implemented as scipy.stats.skewcauchy.

    The Zipfian probability distribution has been implemented as scipy.stats.zipfian.

    The new distributions nchypergeom_fisher and nchypergeom_wallenius implement the Fisher and Wallenius versions of the noncentral hypergeometric distribution, respectively.

    The generalized hyperbolic distribution was added in scipy.stats.genhyperbolic.

    The studentized range distribution was added in scipy.stats.studentized_range.

    scipy.stats.argus now has improved handling for small parameter values.

    Better argument handling/preparation has resulted in performance improvements for many distributions.

    The cosine distribution has added ufuncs for ppf, cdf, sf, and isf methods including numerical precision improvements at the edges of the support of the distribution.

    An option to fit the distribution to data by the method of moments has been added to the fit method of the univariate continuous distributions.

    Other

    scipy.stats.bootstrap has been added to allow estimation of the confidence interval and standard error of a statistic.

    The new function scipy.stats.contingency.crosstab computes a contingency table (i.e. a table of counts of unique entries) for the given data.

    scipy.stats.NumericalInverseHermite enables fast random variate sampling and percentile point function evaluation of an arbitrary univariate statistical distribution.

    New scipy.stats.qmc module

    This new module provides Quasi-Monte Carlo (QMC) generators and associated helper functions.

    It provides a generic class scipy.stats.qmc.QMCEngine which defines a QMC engine/sampler. An engine is state aware: it can be continued, advanced and reset. 3 base samplers are available:

    • scipy.stats.qmc.Sobol the well known Sobol low discrepancy sequence. Several warnings have been added to guide the user into properly using this sampler. The sequence is scrambled by default.
    • scipy.stats.qmc.Halton: Halton low discrepancy sequence. The sequence is scrambled by default.
    • scipy.stats.qmc.LatinHypercube: plain LHS design.

    And 2 special samplers are available:

    • scipy.stats.qmc.MultinomialQMC: sampling from a multinomial distribution using any of the base scipy.stats.qmc.QMCEngine.
    • scipy.stats.qmc.MultivariateNormalQMC: sampling from a multivariate Normal using any of the base scipy.stats.qmc.QMCEngine.

    The module also provide the following helpers:

    • scipy.stats.qmc.discrepancy: assess the quality of a set of points in terms of space coverage.
    • scipy.stats.qmc.update_discrepancy: can be used in an optimization loop to construct a good set of points.
    • scipy.stats.qmc.scale: easily scale a set of points from (to) the unit interval to (from) a given range.

    Deprecated features

    scipy.linalg deprecations

    • scipy.linalg.pinv2 is deprecated and its functionality is completely subsumed into scipy.linalg.pinv
    • Both rcond, cond keywords of scipy.linalg.pinv and scipy.linalg.pinvh were not working and now are deprecated. They are now replaced with functioning atol and rtol keywords with clear usage.

    scipy.spatial deprecations

    • scipy.spatial.distance metrics expect 1d input vectors but will call np.squeeze on their inputs to accept any extra length-1 dimensions. That behaviour is now deprecated.

    Backwards incompatible changes

    Other changes

    We now accept and leverage performance improvements from the ahead-of-time Python-to-C++ transpiler, Pythran, which can be optionally disabled (via export SCIPY_USE_PYTHRAN=0) but is enabled by default at build time.

    There are two changes to the default behavior of scipy.stats.mannwhitenyu:

    • For years, use of the default alternative=None was deprecated; explicit alternative specification was required. Use of the new default value of alternative, "two-sided", is now permitted.
    • Previously, all p-values were based on an asymptotic approximation. Now, for small samples without ties, the p-values returned are exact by default.

    Support has been added for PEP 621 (project metadata in pyproject.toml)

    We now support a Gitpod environment to reduce the barrier to entry for SciPy development; for more details see :ref:quickstart-gitpod.

    Authors

    • @endolith
    • Jelle Aalbers +
    • Adam +
    • Tania Allard +
    • Sven Baars +
    • Max Balandat +
    • baumgarc +
    • Christoph Baumgarten
    • Peter Bell
    • Lilian Besson
    • Robinson Besson +
    • Max Bolingbroke
    • Blair Bonnett +
    • Jordão Bragantini
    • Harm Buisman +
    • Evgeni Burovski
    • Matthias Bussonnier
    • Dominic C
    • CJ Carey
    • Ramón Casero +
    • Chachay +
    • charlotte12l +
    • Benjamin Curtice Corbett +
    • Falcon Dai +
    • Ian Dall +
    • Terry Davis
    • droussea2001 +
    • DWesl +
    • dwight200 +
    • Thomas J. Fan +
    • Joseph Fox-Rabinovitz
    • Max Frei +
    • Laura Gutierrez Funderburk +
    • gbonomib +
    • Matthias Geier +
    • Pradipta Ghosh +
    • Ralf Gommers
    • Evan H +
    • h-vetinari
    • Matt Haberland
    • Anselm Hahn +
    • Alex Henrie
    • Piet Hessenius +
    • Trever Hines +
    • Elisha Hollander +
    • Stephan Hoyer
    • Tom Hu +
    • Kei Ishikawa +
    • Julien Jerphanion
    • Robert Kern
    • Shashank KS +
    • Peter Mahler Larsen
    • Eric Larson
    • Cheng H. Lee +
    • Gregory R. Lee
    • Jean-Benoist Leger +
    • lgfunderburk +
    • liam-o-marsh +
    • Xingyu Liu +
    • Alex Loftus +
    • Christian Lorentzen +
    • Cong Ma
    • Marc +
    • MarkPundurs +
    • Markus Löning +
    • Liam Marsh +
    • Nicholas McKibben
    • melissawm +
    • Jamie Morton
    • Andrew Nelson
    • Nikola Forró
    • Tor Nordam +
    • Olivier Gauthé +
    • Rohit Pandey +
    • Avanindra Kumar Pandeya +
    • Tirth Patel
    • paugier +
    • Alex H. Wagner, PhD +
    • Jeff Plourde +
    • Ilhan Polat
    • pranavrajpal +
    • Vladyslav Rachek
    • Bharat Raghunathan
    • Recursing +
    • Tyler Reddy
    • Lucas Roberts
    • Gregor Robinson +
    • Pamphile Roy +
    • Atsushi Sakai
    • Benjamin Santos
    • Martin K. Scherer +
    • Thomas Schmelzer +
    • Daniel Scott +
    • Sebastian Wallkötter +
    • serge-sans-paille +
    • Namami Shanker +
    • Masashi Shibata +
    • Alexandre de Siqueira +
    • Albert Steppi +
    • Adam J. Stewart +
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Mike Taves
    • Dan Temkin +
    • Nicolas Tessore +
    • tsubota20 +
    • Robert Uhl
    • christos val +
    • Bas van Beek +
    • Ashutosh Varma +
    • Jose Vazquez +
    • Sebastiano Vigna
    • Aditya Vijaykumar
    • VNMabus
    • Arthur Volant +
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Anreas Weh
    • Josh Wilson
    • Rory Yorke
    • Egor Zemlyanoy
    • Marc Zoeller +
    • zoj613 +
    • 秋纫 +

    A total of 126 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(367.69 KB)
    README(78.47 KB)
    scipy-1.7.0rc2-cp37-cp37m-macosx_10_9_x86_64.whl(30.40 MB)
    scipy-1.7.0rc2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.90 MB)
    scipy-1.7.0rc2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl(24.21 MB)
    scipy-1.7.0rc2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.18 MB)
    scipy-1.7.0rc2-cp37-cp37m-win32.whl(28.96 MB)
    scipy-1.7.0rc2-cp37-cp37m-win_amd64.whl(32.03 MB)
    scipy-1.7.0rc2-cp38-cp38-macosx_10_9_x86_64.whl(30.46 MB)
    scipy-1.7.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.99 MB)
    scipy-1.7.0rc2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl(24.13 MB)
    scipy-1.7.0rc2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.04 MB)
    scipy-1.7.0rc2-cp38-cp38-win32.whl(29.09 MB)
    scipy-1.7.0rc2-cp38-cp38-win_amd64.whl(32.16 MB)
    scipy-1.7.0rc2-cp39-cp39-macosx_10_9_x86_64.whl(30.61 MB)
    scipy-1.7.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(26.00 MB)
    scipy-1.7.0rc2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl(24.24 MB)
    scipy-1.7.0rc2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.12 MB)
    scipy-1.7.0rc2-cp39-cp39-win32.whl(29.10 MB)
    scipy-1.7.0rc2-cp39-cp39-win_amd64.whl(32.18 MB)
    scipy-1.7.0rc2.tar.gz(34.43 MB)
    scipy-1.7.0rc2.tar.xz(26.08 MB)
    scipy-1.7.0rc2.zip(45.59 MB)
  • v1.7.0rc1(Jun 6, 2021)

    SciPy 1.7.0 Release Notes

    Note: Scipy 1.7.0 is not released yet!

    SciPy 1.7.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.7.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • A new submodule for quasi-Monte Carlo, scipy.stats.qmc, was added
    • The documentation design was updated to use the same PyData-Sphinx theme as other NumFOCUS packages like NumPy.
    • We now vendor and leverage the Boost C++ library to enable numerous improvements for long-standing weaknesses in scipy.stats
    • scipy.stats has six new distributions, eight new (or overhauled) hypothesis tests, a new function for bootstrapping, a class that enables fast random variate sampling and percentile point function evaluation, and many other enhancements.
    • cdist and pdist distance calculations are faster for several metrics, especially weighted cases, thanks to a rewrite to a new C++ backend framework
    • A new class for radial basis function interpolation, RBFInterpolator, was added to address issues with the Rbf class.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of the improvements to scipy.stats.

    New features

    scipy.cluster improvements

    An optional argument, seed, has been added to kmeans and kmeans2 to set the random generator and random state.

    scipy.interpolate improvements

    Improved input validation and error messages for fitpack.bispev and fitpack.parder for scenarios that previously caused substantial confusion for users.

    The class RBFInterpolator was added to supersede the Rbf class. The new class has usage that more closely follows other interpolator classes, corrects sign errors that caused unexpected smoothing behavior, includes polynomial terms in the interpolant (which are necessary for some RBF choices), and supports interpolation using only the k-nearest neighbors for memory efficiency.

    scipy.linalg improvements

    An LAPACK wrapper was added for access to the tgexc subroutine.

    scipy.ndimage improvements

    scipy.ndimage.affine_transform is now able to infer the output_shape from the out array.

    scipy.optimize improvements

    The optional parameter bounds was added to _minimize_neldermead to support bounds constraints for the Nelder-Mead solver.

    trustregion methods trust-krylov, dogleg and trust-ncg can now estimate hess by finite difference using one of ["2-point", "3-point", "cs"].

    halton was added as a sampling_method in scipy.optimize.shgo. sobol was fixed and is now using scipy.stats.qmc.Sobol.

    halton and sobol were added as init methods in scipy.optimize.differential_evolution.

    differential_evolution now accepts an x0 parameter to provide an initial guess for the minimization.

    least_squares has a modest performance improvement when SciPy is built with Pythran transpiler enabled.

    When linprog is used with method 'highs', 'highs-ipm', or 'highs-ds', the result object now reports the marginals (AKA shadow prices, dual values) and residuals associated with each constraint.

    scipy.signal improvements

    get_window supports general_cosine and general_hamming window functions.

    scipy.signal.medfilt2d now releases the GIL where appropriate to enable performance gains via multithreaded calculations.

    scipy.sparse improvements

    Addition of dia_matrix sparse matrices is now faster.

    scipy.spatial improvements

    distance.cdist and distance.pdist performance has greatly improved for certain weighted metrics. Namely: minkowski, euclidean, chebyshev, canberra, and cityblock.

    Modest performance improvements for many of the unweighted cdist and pdist metrics noted above.

    The parameter seed was added to scipy.spatial.vq.kmeans and scipy.spatial.vq.kmeans2.

    The parameters axis and keepdims where added to scipy.spatial.distance.jensenshannon.

    The rotation methods from_rotvec and as_rotvec now accept a degrees argument to specify usage of degrees instead of radians.

    scipy.special improvements

    Wright's generalized Bessel function for positive arguments was added as scipy.special.wright_bessel.

    An implementation of the inverse of the Log CDF of the Normal Distribution is now available via scipy.special.ndtri_exp.

    scipy.stats improvements

    Hypothesis Tests

    The Mann-Whitney-Wilcoxon test, mannwhitneyu, has been rewritten. It now supports n-dimensional input, an exact test method when there are no ties, and improved documentation. Please see "Other changes" for adjustments to default behavior.

    The new function scipy.stats.binomtest replaces scipy.stats.binom_test. The new function returns an object that calculates a confidence intervals of the proportion parameter. Also, performance was improved from O(n) to O(log(n)) by using binary search.

    The two-sample version of the Cramer-von Mises test is implemented in scipy.stats.cramervonmises_2samp.

    The Alexander-Govern test is implemented in the new function scipy.stats.alexandergovern.

    The new functions scipy.stats.barnard_exact and scipy.stats. boschloo_exact respectively perform Barnard's exact test and Boschloo's exact test for 2x2 contingency tables.

    The new function scipy.stats.page_trend_test performs Page's test for ordered alternatives.

    The new function scipy.stats.somersd performs Somers' D test for ordinal association between two variables.

    An option, permutations, has been added in scipy.stats.ttest_ind to perform permutation t-tests. A trim option was also added to perform a trimmed (Yuen's) t-test.

    The alternative parameter was added to the skewtest, kurtosistest, ranksums, mood, ansari, linregress, and spearmanr functions to allow one-sided hypothesis testing.

    Sample statistics

    The new function scipy.stats.differential_entropy estimates the differential entropy of a continuous distribution from a sample.

    The boxcox and boxcox_normmax now allow the user to control the optimizer used to minimize the negative log-likelihood function.

    A new function scipy.stats.contingency.relative_risk calculates the relative risk, or risk ratio, of a 2x2 contingency table. The object returned has a method to compute the confidence interval of the relative risk.

    Performance improvements in the skew and kurtosis functions achieved by removal of repeated/redundant calculations.

    Substantial performance improvements in scipy.stats.mstats.hdquantiles_sd.

    The new function scipy.stats.contingency.association computes several measures of association for a contingency table: Pearsons contingency coefficient, Cramer's V, and Tschuprow's T.

    The parameter nan_policy was added to scipy.stats.zmap to provide options for handling the occurrence of nan in the input data.

    The parameter ddof was added to scipy.stats.variation and scipy.stats.mstats.variation.

    The parameter weights was added to scipy.stats.gmean.

    Statistical Distributions

    We now vendor and leverage the Boost C++ library to address a number of previously reported issues in stats. Notably, beta, binom, nbinom now have Boost backends, and it is straightforward to leverage the backend for additional functions.

    The skew Cauchy probability distribution has been implemented as scipy.stats.skewcauchy.

    The Zipfian probability distribution has been implemented as scipy.stats.zipfian.

    The new distributions nchypergeom_fisher and nchypergeom_wallenius implement the Fisher and Wallenius versions of the noncentral hypergeometric distribution, respectively.

    The generalized hyperbolic distribution was added in scipy.stats.genhyperbolic.

    The studentized range distribution was added in scipy.stats.studentized_range.

    scipy.stats.argus now has improved handling for small parameter values.

    Better argument handling/preparation has resulted in performance improvements for many distributions.

    The cosine distribution has added ufuncs for ppf, cdf, sf, and isf methods including numerical precision improvements at the edges of the support of the distribution.

    An option to fit the distribution to data by the method of moments has been added to the fit method of the univariate continuous distributions.

    Other

    scipy.stats.bootstrap has been added to allow estimation of the confidence interval and standard error of a statistic.

    The new function scipy.stats.contingency.crosstab computes a contingency table (i.e. a table of counts of unique entries) for the given data.

    scipy.stats.NumericalInverseHermite enables fast random variate sampling and percentile point function evaluation of an arbitrary univariate statistical distribution.

    New scipy.stats.qmc module

    This new module provides Quasi-Monte Carlo (QMC) generators and associated helper functions.

    It provides a generic class scipy.stats.qmc.QMCEngine which defines a QMC engine/sampler. An engine is state aware: it can be continued, advanced and reset. 3 base samplers are available:

    • scipy.stats.qmc.Sobol the well known Sobol low discrepancy sequence. Several warnings have been added to guide the user into properly using this sampler. The sequence is scrambled by default.
    • scipy.stats.qmc.Halton: Halton low discrepancy sequence. The sequence is scrambled by default.
    • scipy.stats.qmc.LatinHypercube: plain LHS design.

    And 2 special samplers are available:

    • scipy.stats.qmc.MultinomialQMC: sampling from a multinomial distribution using any of the base scipy.stats.qmc.QMCEngine.
    • scipy.stats.qmc.MultivariateNormalQMC: sampling from a multivariate Normal using any of the base scipy.stats.qmc.QMCEngine.

    The module also provide the following helpers:

    • scipy.stats.qmc.discrepancy: assess the quality of a set of points in terms of space coverage.
    • scipy.stats.qmc.update_discrepancy: can be used in an optimization loop to construct a good set of points.
    • scipy.stats.qmc.scale: easily scale a set of points from (to) the unit interval to (from) a given range.

    Deprecated features

    scipy.linalg deprecations

    • scipy.linalg.pinv2 is deprecated and its functionality is completely subsumed into scipy.linalg.pinv
    • Both rcond, cond keywords of scipy.linalg.pinv and scipy.linalg.pinvh were not working and now are deprecated. They are now replaced with functioning atol and rtol keywords with clear usage.

    scipy.spatial deprecations

    • scipy.spatial.distance metrics expect 1d input vectors but will call np.squeeze on their inputs to accept any extra length-1 dimensions. That behaviour is now deprecated.

    Backwards incompatible changes

    Other changes

    We now accept and leverage performance improvements from the ahead-of-time Python-to-C++ transpiler, Pythran, which can be optionally disabled (via export SCIPY_USE_PYTHRAN=0) but is enabled by default at build time.

    There are two changes to the default behavior of scipy.stats.mannwhitenyu:

    • For years, use of the default alternative=None was deprecated; explicit alternative specification was required. Use of the new default value of alternative, "two-sided", is now permitted.
    • Previously, all p-values were based on an asymptotic approximation. Now, for small samples without ties, the p-values returned are exact by default.

    Support has been added for PEP 621 (project metadata in pyproject.toml)

    We now support a Gitpod environment to reduce the barrier to entry for SciPy development; for more details see quickstart-gitpod.

    Authors

    • @endolith
    • Jelle Aalbers +
    • Adam +
    • Tania Allard +
    • Sven Baars +
    • Max Balandat +
    • baumgarc +
    • Christoph Baumgarten
    • Peter Bell
    • Lilian Besson
    • Robinson Besson +
    • Max Bolingbroke
    • Blair Bonnett +
    • Jordão Bragantini
    • Harm Buisman +
    • Evgeni Burovski
    • Matthias Bussonnier
    • Dominic C
    • CJ Carey
    • Ramón Casero +
    • Chachay +
    • charlotte12l +
    • Benjamin Curtice Corbett +
    • Falcon Dai +
    • Ian Dall +
    • Terry Davis
    • droussea2001 +
    • DWesl +
    • dwight200 +
    • Thomas J. Fan +
    • Joseph Fox-Rabinovitz
    • Max Frei +
    • Laura Gutierrez Funderburk +
    • gbonomib +
    • Matthias Geier +
    • Pradipta Ghosh +
    • Ralf Gommers
    • Evan H +
    • h-vetinari
    • Matt Haberland
    • Anselm Hahn +
    • Alex Henrie
    • Piet Hessenius +
    • Trever Hines +
    • Elisha Hollander +
    • Stephan Hoyer
    • Tom Hu +
    • Kei Ishikawa +
    • Julien Jerphanion
    • Robert Kern
    • Shashank KS +
    • Peter Mahler Larsen
    • Eric Larson
    • Cheng H. Lee +
    • Gregory R. Lee
    • Jean-Benoist Leger +
    • lgfunderburk +
    • liam-o-marsh +
    • Xingyu Liu +
    • Alex Loftus +
    • Christian Lorentzen +
    • Cong Ma
    • Marc +
    • MarkPundurs +
    • Markus Löning +
    • Liam Marsh +
    • Nicholas McKibben
    • melissawm +
    • Jamie Morton
    • Andrew Nelson
    • Nikola Forró
    • Tor Nordam +
    • Olivier Gauthé +
    • Rohit Pandey +
    • Avanindra Kumar Pandeya +
    • Tirth Patel
    • paugier +
    • Alex H. Wagner, PhD +
    • Jeff Plourde +
    • Ilhan Polat
    • pranavrajpal +
    • Vladyslav Rachek
    • Bharat Raghunathan
    • Recursing +
    • Tyler Reddy
    • Lucas Roberts
    • Gregor Robinson +
    • Pamphile Roy +
    • Atsushi Sakai
    • Benjamin Santos
    • Martin K. Scherer +
    • Thomas Schmelzer +
    • Daniel Scott +
    • Sebastian Wallkötter +
    • serge-sans-paille +
    • Namami Shanker +
    • Masashi Shibata +
    • Alexandre de Siqueira +
    • Albert Steppi +
    • Adam J. Stewart +
    • Kai Striega
    • Diana Sukhoverkhova
    • Søren Fuglede Jørgensen
    • Mike Taves
    • Dan Temkin +
    • Nicolas Tessore +
    • tsubota20 +
    • Robert Uhl
    • christos val +
    • Bas van Beek +
    • Ashutosh Varma +
    • Jose Vazquez +
    • Sebastiano Vigna
    • Aditya Vijaykumar
    • VNMabus
    • Arthur Volant +
    • Samuel Wallan
    • Stefan van der Walt
    • Warren Weckesser
    • Anreas Weh
    • Josh Wilson
    • Rory Yorke
    • Egor Zemlyanoy
    • Marc Zoeller +
    • zoj613 +
    • 秋纫 +

    A total of 126 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(364.94 KB)
    README(78.05 KB)
    scipy-1.7.0rc1-cp37-cp37m-macosx_10_9_x86_64.whl(30.40 MB)
    scipy-1.7.0rc1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.90 MB)
    scipy-1.7.0rc1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl(24.21 MB)
    scipy-1.7.0rc1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.18 MB)
    scipy-1.7.0rc1-cp37-cp37m-win32.whl(28.96 MB)
    scipy-1.7.0rc1-cp37-cp37m-win_amd64.whl(32.03 MB)
    scipy-1.7.0rc1-cp38-cp38-macosx_10_9_x86_64.whl(30.46 MB)
    scipy-1.7.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(25.99 MB)
    scipy-1.7.0rc1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl(24.13 MB)
    scipy-1.7.0rc1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.04 MB)
    scipy-1.7.0rc1-cp38-cp38-win32.whl(29.09 MB)
    scipy-1.7.0rc1-cp38-cp38-win_amd64.whl(32.16 MB)
    scipy-1.7.0rc1-cp39-cp39-macosx_10_9_x86_64.whl(30.61 MB)
    scipy-1.7.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl(26.00 MB)
    scipy-1.7.0rc1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl(24.24 MB)
    scipy-1.7.0rc1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl(27.12 MB)
    scipy-1.7.0rc1-cp39-cp39-win32.whl(29.10 MB)
    scipy-1.7.0rc1-cp39-cp39-win_amd64.whl(32.18 MB)
    scipy-1.7.0rc1.tar.gz(41.27 MB)
    scipy-1.7.0rc1.tar.xz(27.87 MB)
    scipy-1.7.0rc1.zip(52.63 MB)
  • v1.6.2(Mar 25, 2021)

    SciPy 1.6.2 Release Notes

    SciPy 1.6.2 is a bug-fix release with no new features compared to 1.6.1. This is also the first SciPy release to place upper bounds on some dependencies to improve the long-term repeatability of source builds.

    Authors

    • Pradipta Ghosh +
    • Tyler Reddy
    • Ralf Gommers
    • Martin K. Scherer +
    • Robert Uhl
    • Warren Weckesser

    A total of 6 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(3.82 KB)
    README(6.22 KB)
    scipy-1.6.2-cp37-cp37m-macosx_10_9_x86_64.whl(29.28 MB)
    scipy-1.6.2-cp37-cp37m-manylinux1_i686.whl(23.18 MB)
    scipy-1.6.2-cp37-cp37m-manylinux1_x86_64.whl(26.12 MB)
    scipy-1.6.2-cp37-cp37m-manylinux2014_aarch64.whl(24.76 MB)
    scipy-1.6.2-cp37-cp37m-win32.whl(28.05 MB)
    scipy-1.6.2-cp37-cp37m-win_amd64.whl(31.05 MB)
    scipy-1.6.2-cp38-cp38-macosx_10_9_x86_64.whl(29.32 MB)
    scipy-1.6.2-cp38-cp38-manylinux1_i686.whl(23.09 MB)
    scipy-1.6.2-cp38-cp38-manylinux1_x86_64.whl(25.98 MB)
    scipy-1.6.2-cp38-cp38-manylinux2014_aarch64.whl(24.86 MB)
    scipy-1.6.2-cp38-cp38-win32.whl(28.18 MB)
    scipy-1.6.2-cp38-cp38-win_amd64.whl(31.19 MB)
    scipy-1.6.2-cp39-cp39-macosx_10_9_x86_64.whl(29.45 MB)
    scipy-1.6.2-cp39-cp39-manylinux1_i686.whl(23.17 MB)
    scipy-1.6.2-cp39-cp39-manylinux1_x86_64.whl(26.03 MB)
    scipy-1.6.2-cp39-cp39-manylinux2014_aarch64.whl(24.86 MB)
    scipy-1.6.2-cp39-cp39-win32.whl(28.17 MB)
    scipy-1.6.2-cp39-cp39-win_amd64.whl(31.18 MB)
    scipy-1.6.2.tar.gz(25.92 MB)
    scipy-1.6.2.tar.xz(17.86 MB)
    scipy-1.6.2.zip(27.90 MB)
  • v1.6.1(Feb 18, 2021)

    SciPy 1.6.1 Release Notes

    SciPy 1.6.1 is a bug-fix release with no new features compared to 1.6.0.

    Please note that for SciPy wheels to correctly install with pip on macOS 11, pip >= 20.3.3 is needed.

    Authors

    • Peter Bell
    • Evgeni Burovski
    • CJ Carey
    • Ralf Gommers
    • Peter Mahler Larsen
    • Cheng H. Lee +
    • Cong Ma
    • Nicholas McKibben
    • Nikola Forró
    • Tyler Reddy
    • Warren Weckesser

    A total of 11 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(9.87 KB)
    README(9.24 KB)
    scipy-1.6.1-cp37-cp37m-macosx_10_9_x86_64.whl(29.28 MB)
    scipy-1.6.1-cp37-cp37m-manylinux1_i686.whl(23.17 MB)
    scipy-1.6.1-cp37-cp37m-manylinux1_x86_64.whl(26.12 MB)
    scipy-1.6.1-cp37-cp37m-manylinux2014_aarch64.whl(24.76 MB)
    scipy-1.6.1-cp37-cp37m-win32.whl(28.05 MB)
    scipy-1.6.1-cp37-cp37m-win_amd64.whl(31.04 MB)
    scipy-1.6.1-cp38-cp38-macosx_10_9_x86_64.whl(29.32 MB)
    scipy-1.6.1-cp38-cp38-manylinux1_i686.whl(23.09 MB)
    scipy-1.6.1-cp38-cp38-manylinux1_x86_64.whl(25.98 MB)
    scipy-1.6.1-cp38-cp38-manylinux2014_aarch64.whl(24.86 MB)
    scipy-1.6.1-cp38-cp38-win32.whl(28.18 MB)
    scipy-1.6.1-cp38-cp38-win_amd64.whl(31.18 MB)
    scipy-1.6.1-cp39-cp39-macosx_10_9_x86_64.whl(29.45 MB)
    scipy-1.6.1-cp39-cp39-manylinux1_i686.whl(23.17 MB)
    scipy-1.6.1-cp39-cp39-manylinux1_x86_64.whl(26.04 MB)
    scipy-1.6.1-cp39-cp39-manylinux2014_aarch64.whl(24.85 MB)
    scipy-1.6.1-cp39-cp39-win32.whl(28.17 MB)
    scipy-1.6.1-cp39-cp39-win_amd64.whl(31.18 MB)
    scipy-1.6.1.tar.gz(26.07 MB)
    scipy-1.6.1.tar.xz(17.87 MB)
    scipy-1.6.1.zip(28.06 MB)
  • v1.6.0(Dec 31, 2020)

    SciPy 1.6.0 Release Notes

    SciPy 1.6.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.6.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • scipy.ndimage improvements: Fixes and ehancements to boundary extension modes for interpolation functions. Support for complex-valued inputs in many filtering and interpolation functions. New grid_mode option for scipy.ndimage.zoom to enable results consistent with scikit-image's rescale.
    • scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS library.
    • scipy.stats improvements including new distributions, a new test, and enhancements to existing distributions and tests

    New features

    scipy.special improvements

    scipy.special now has improved support for 64-bit LAPACK backend

    scipy.odr improvements

    scipy.odr now has support for 64-bit integer BLAS

    scipy.odr.ODR has gained an optional overwrite argument so that existing files may be overwritten.

    scipy.integrate improvements

    Some renames of functions with poor names were done, with the old names retained without being in the reference guide for backwards compatibility reasons:

    • integrate.simps was renamed to integrate.simpson
    • integrate.trapz was renamed to integrate.trapezoid
    • integrate.cumtrapz was renamed to integrate.cumulative_trapezoid

    scipy.cluster improvements

    scipy.cluster.hierarchy.DisjointSet has been added for incremental connectivity queries.

    scipy.cluster.hierarchy.dendrogram return value now also includes leaf color information in leaves_color_list.

    scipy.interpolate improvements

    scipy.interpolate.interp1d has a new method nearest-up, similar to the existing method nearest but rounds half-integers up instead of down.

    scipy.io improvements

    Support has been added for reading arbitrary bit depth integer PCM WAV files from 1- to 32-bit, including the commonly-requested 24-bit depth.

    scipy.linalg improvements

    The new function scipy.linalg.matmul_toeplitz uses the FFT to compute the product of a Toeplitz matrix with another matrix.

    scipy.linalg.sqrtm and scipy.linalg.logm have performance improvements thanks to additional Cython code.

    Python LAPACK wrappers have been added for pptrf, pptrs, ppsv, pptri, and ppcon.

    scipy.linalg.norm and the svd family of functions will now use 64-bit integer backends when available.

    scipy.ndimage improvements

    scipy.ndimage.convolve, scipy.ndimage.correlate and their 1d counterparts now accept both complex-valued images and/or complex-valued filter kernels. All convolution-based filters also now accept complex-valued inputs (e.g. gaussian_filter, uniform_filter, etc.).

    Multiple fixes and enhancements to boundary handling were introduced to scipy.ndimage interpolation functions (i.e. affine_transform, geometric_transform, map_coordinates, rotate, shift, zoom).

    A new boundary mode, grid-wrap was added which wraps images periodically, using a period equal to the shape of the input image grid. This is in contrast to the existing wrap mode which uses a period that is one sample smaller than the original signal extent along each dimension.

    A long-standing bug in the reflect boundary condition has been fixed and the mode grid-mirror was introduced as a synonym for reflect.

    A new boundary mode, grid-constant is now available. This is similar to the existing ndimage constant mode, but interpolation will still performed at coordinate values outside of the original image extent. This grid-constant mode is consistent with OpenCV's BORDER_CONSTANT mode and scikit-image's constant mode.

    Spline pre-filtering (used internally by ndimage interpolation functions when order >= 2), now supports all boundary modes rather than always defaulting to mirror boundary conditions. The standalone functions spline_filter and spline_filter1d have analytical boundary conditions that match modes mirror, grid-wrap and reflect.

    scipy.ndimage interpolation functions now accept complex-valued inputs. In this case, the interpolation is applied independently to the real and imaginary components.

    The ndimage tutorials (https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been updated with new figures to better clarify the exact behavior of all of the interpolation boundary modes.

    scipy.ndimage.zoom now has a grid_mode option that changes the coordinate of the center of the first pixel along an axis from 0 to 0.5. This allows resizing in a manner that is consistent with the behavior of scikit-image's resize and rescale functions (and OpenCV's cv2.resize).

    scipy.optimize improvements

    scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS C++ library. method='highs-ds' uses a high performance dual revised simplex implementation (HSOL), method='highs-ipm' uses an interior-point method with crossover, and method='highs' chooses between the two automatically. These methods are typically much faster and often exceed the accuracy of other linprog methods, so we recommend explicitly specifying one of these three method values when using linprog.

    scipy.optimize.quadratic_assignment has been added for approximate solution of the quadratic assignment problem.

    scipy.optimize.linear_sum_assignment now has a substantially reduced overhead for small cost matrix sizes

    scipy.optimize.least_squares has improved performance when the user provides the jacobian as a sparse jacobian already in csr_matrix format

    scipy.optimize.linprog now has an rr_method argument for specification of the method used for redundancy handling, and a new method for this purpose is available based on the interpolative decomposition approach.

    scipy.signal improvements

    scipy.signal.gammatone has been added to design FIR or IIR filters that model the human auditory system.

    scipy.signal.iircomb has been added to design IIR peaking/notching comb filters that can boost/attenuate a frequency from a signal.

    scipy.signal.sosfilt performance has been improved to avoid some previously- observed slowdowns

    scipy.signal.windows.taylor has been added--the Taylor window function is commonly used in radar digital signal processing

    scipy.signal.gauss_spline now supports list type input for consistency with other related SciPy functions

    scipy.signal.correlation_lags has been added to allow calculation of the lag/ displacement indices array for 1D cross-correlation.

    scipy.sparse improvements

    A solver for the minimum weight full matching problem for bipartite graphs, also known as the linear assignment problem, has been added in scipy.sparse.csgraph.min_weight_full_bipartite_matching. In particular, this provides functionality analogous to that of scipy.optimize.linear_sum_assignment, but with improved performance for sparse inputs, and the ability to handle inputs whose dense representations would not fit in memory.

    The time complexity of scipy.sparse.block_diag has been improved dramatically from quadratic to linear.

    scipy.sparse.linalg improvements

    The vendored version of SuperLU has been updated

    scipy.fft improvements

    The vendored pocketfft library now supports compiling with ARM neon vector extensions and has improved thread pool behavior.

    scipy.spatial improvements

    The python implementation of KDTree has been dropped and KDTree is now implemented in terms of cKDTree. You can now expect cKDTree-like performance by default. This also means sys.setrecursionlimit no longer needs to be increased for querying large trees.

    transform.Rotation has been updated with support for Modified Rodrigues Parameters alongside the existing rotation representations (PR gh-12667).

    scipy.spatial.transform.Rotation has been partially cythonized, with some performance improvements observed

    scipy.spatial.distance.cdist has improved performance with the minkowski metric, especially for p-norm values of 1 or 2.

    scipy.stats improvements

    New distributions have been added to scipy.stats:

    • The asymmetric Laplace continuous distribution has been added as scipy.stats.laplace_asymmetric.
    • The negative hypergeometric distribution has been added as scipy.stats.nhypergeom.
    • The multivariate t distribution has been added as scipy.stats.multivariate_t.
    • The multivariate hypergeometric distribution has been added as scipy.stats.multivariate_hypergeom.

    The fit method has been overridden for several distributions (laplace, pareto, rayleigh, invgauss, logistic, gumbel_l, gumbel_r); they now use analytical, distribution-specific maximum likelihood estimation results for greater speed and accuracy than the generic (numerical optimization) implementation.

    The one-sample Cramér-von Mises test has been added as scipy.stats.cramervonmises.

    An option to compute one-sided p-values was added to scipy.stats.ttest_1samp, scipy.stats.ttest_ind_from_stats, scipy.stats.ttest_ind and scipy.stats.ttest_rel.

    The function scipy.stats.kendalltau now has an option to compute Kendall's tau-c (also known as Stuart's tau-c), and support has been added for exact p-value calculations for sample sizes > 171.

    stats.trapz was renamed to stats.trapezoid, with the former name retained as an alias for backwards compatibility reasons.

    The function scipy.stats.linregress now includes the standard error of the intercept in its return value.

    The _logpdf, _sf, and _isf methods have been added to scipy.stats.nakagami; _sf and _isf methods also added to scipy.stats.gumbel_r

    The sf method has been added to scipy.stats.levy and scipy.stats.levy_l for improved precision.

    scipy.stats.binned_statistic_dd performance improvements for the following computed statistics: max, min, median, and std.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of these improvements to scipy.stats.

    Deprecated features

    scipy.spatial changes

    Calling KDTree.query with k=None to find all neighbours is deprecated. Use KDTree.query_ball_point instead.

    distance.wminkowski was deprecated; use distance.minkowski and supply weights with the w keyword instead.

    Backwards incompatible changes

    scipy changes

    Using scipy.fft as a function aliasing numpy.fft.fft was removed after being deprecated in SciPy 1.4.0. As a result, the scipy.fft submodule must be explicitly imported now, in line with other SciPy subpackages.

    scipy.signal changes

    The output of decimate, lfilter_zi, lfiltic, sos2tf, and sosfilt_zi have been changed to match numpy.result_type of their inputs.

    The window function slepian was removed. It had been deprecated since SciPy 1.1.

    scipy.spatial changes

    cKDTree.query now returns 64-bit rather than 32-bit integers on Windows, making behaviour consistent between platforms (PR gh-12673).

    scipy.stats changes

    The frechet_l and frechet_r distributions were removed. They were deprecated since SciPy 1.0.

    Other changes

    setup_requires was removed from setup.py. This means that users invoking python setup.py install without having numpy already installed will now get an error, rather than having numpy installed for them via easy_install. This install method was always fragile and problematic, users are encouraged to use pip when installing from source.

    • Fixed a bug in scipy.optimize.dual_annealing accept_reject calculation that caused uphill jumps to be accepted less frequently.
    • The time required for (un)pickling of scipy.stats.rv_continuous, scipy.stats.rv_discrete, and scipy.stats.rv_frozen has been significantly reduced (gh12550). Inheriting subclasses should note that __setstate__ no longer calls __init__ upon unpickling.

    Authors

    • @endolith
    • @vkk800
    • aditya +
    • George Bateman +
    • Christoph Baumgarten
    • Peter Bell
    • Tobias Biester +
    • Keaton J. Burns +
    • Evgeni Burovski
    • Rüdiger Busche +
    • Matthias Bussonnier
    • Dominic C +
    • Corallus Caninus +
    • CJ Carey
    • Thomas A Caswell
    • chapochn +
    • Lucía Cheung
    • Zach Colbert +
    • Coloquinte +
    • Yannick Copin +
    • Devin Crowley +
    • Terry Davis +
    • Michaël Defferrard +
    • devonwp +
    • Didier +
    • divenex +
    • Thomas Duvernay +
    • Eoghan O'Connell +
    • Gökçen Eraslan
    • Kristian Eschenburg +
    • Ralf Gommers
    • Thomas Grainger +
    • GreatV +
    • Gregory Gundersen +
    • h-vetinari +
    • Matt Haberland
    • Mark Harfouche +
    • He He +
    • Alex Henrie
    • Chun-Ming Huang +
    • Martin James McHugh III +
    • Alex Izvorski +
    • Joey +
    • ST John +
    • Jonas Jonker +
    • Julius Bier Kirkegaard
    • Marcin Konowalczyk +
    • Konrad0
    • Sam Van Kooten +
    • Sergey Koposov +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Loïc Estève
    • Jean-Luc Margot +
    • MarkusKoebis +
    • Nikolay Mayorov
    • G. D. McBain
    • Andrew McCluskey +
    • Nicholas McKibben
    • Sturla Molden
    • Denali Molitor +
    • Eric Moore
    • Shashaank N +
    • Prashanth Nadukandi +
    • nbelakovski +
    • Andrew Nelson
    • Nick +
    • Nikola Forró +
    • odidev
    • ofirr +
    • Sambit Panda
    • Dima Pasechnik
    • Tirth Patel +
    • Matti Picus
    • Paweł Redzyński +
    • Vladimir Philipenko +
    • Philipp Thölke +
    • Ilhan Polat
    • Eugene Prilepin +
    • Vladyslav Rachek
    • Ram Rachum +
    • Tyler Reddy
    • Martin Reinecke +
    • Simon Segerblom Rex +
    • Lucas Roberts
    • Benjamin Rowell +
    • Eli Rykoff +
    • Atsushi Sakai
    • Moritz Schulte +
    • Daniel B. Smith
    • Steve Smith +
    • Jan Soedingrekso +
    • Victor Stinner +
    • Jose Storopoli +
    • Diana Sukhoverkhova +
    • Søren Fuglede Jørgensen
    • taoky +
    • Mike Taves +
    • Ian Thomas +
    • Will Tirone +
    • Frank Torres +
    • Seth Troisi
    • Ronald van Elburg +
    • Hugo van Kemenade
    • Paul van Mulbregt
    • Saul Ivan Rivas Vega +
    • Pauli Virtanen
    • Jan Vleeshouwers
    • Samuel Wallan
    • Warren Weckesser
    • Ben West +
    • Eric Wieser
    • WillTirone +
    • Levi John Wolf +
    • Zhiqing Xiao
    • Rory Yorke +
    • Yun Wang (Maigo) +
    • Egor Zemlyanoy +
    • ZhihuiChen0903 +
    • Jacob Zhong +

    A total of 122 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(276.47 KB)
    README(72.06 KB)
    scipy-1.6.0-cp37-cp37m-macosx_10_9_x86_64.whl(29.27 MB)
    scipy-1.6.0-cp37-cp37m-manylinux1_i686.whl(23.15 MB)
    scipy-1.6.0-cp37-cp37m-manylinux1_x86_64.whl(26.11 MB)
    scipy-1.6.0-cp37-cp37m-manylinux2014_aarch64.whl(24.75 MB)
    scipy-1.6.0-cp37-cp37m-win32.whl(28.04 MB)
    scipy-1.6.0-cp37-cp37m-win_amd64.whl(31.03 MB)
    scipy-1.6.0-cp38-cp38-macosx_10_9_x86_64.whl(29.31 MB)
    scipy-1.6.0-cp38-cp38-manylinux1_i686.whl(23.08 MB)
    scipy-1.6.0-cp38-cp38-manylinux1_x86_64.whl(25.97 MB)
    scipy-1.6.0-cp38-cp38-manylinux2014_aarch64.whl(24.85 MB)
    scipy-1.6.0-cp38-cp38-win32.whl(28.17 MB)
    scipy-1.6.0-cp38-cp38-win_amd64.whl(31.17 MB)
    scipy-1.6.0-cp39-cp39-macosx_10_9_x86_64.whl(29.43 MB)
    scipy-1.6.0-cp39-cp39-manylinux1_i686.whl(23.16 MB)
    scipy-1.6.0-cp39-cp39-manylinux1_x86_64.whl(26.03 MB)
    scipy-1.6.0-cp39-cp39-manylinux2014_aarch64.whl(24.84 MB)
    scipy-1.6.0-cp39-cp39-win32.whl(28.16 MB)
    scipy-1.6.0-cp39-cp39-win_amd64.whl(31.17 MB)
    scipy-1.6.0.tar.gz(26.01 MB)
    scipy-1.6.0.tar.xz(17.90 MB)
    scipy-1.6.0.zip(27.85 MB)
  • v1.6.0rc2(Dec 22, 2020)

    SciPy 1.6.0 Release Notes

    note: Scipy 1.6.0 is not released yet!

    SciPy 1.6.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.6.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • scipy.ndimage improvements: Fixes and ehancements to boundary extension modes for interpolation functions. Support for complex-valued inputs in many filtering and interpolation functions. New grid_mode option for scipy.ndimage.zoom to enable results consistent with scikit-image's rescale.
    • scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS library.
    • scipy.stats improvements including new distributions, a new test, and enhancements to existing distributions and tests

    New features

    scipy.special improvements

    scipy.special now has improved support for 64-bit LAPACK backend

    scipy.odr improvements

    scipy.odr now has support for 64-bit integer BLAS

    scipy.odr.ODR has gained an optional overwrite argument so that existing files may be overwritten.

    scipy.integrate improvements

    Some renames of functions with poor names were done, with the old names retained without being in the reference guide for backwards compatibility reasons:

    • integrate.simps was renamed to integrate.simpson
    • integrate.trapz was renamed to integrate.trapezoid
    • integrate.cumtrapz was renamed to integrate.cumulative_trapezoid

    scipy.cluster improvements

    scipy.cluster.hierarchy.DisjointSet has been added for incremental connectivity queries.

    scipy.cluster.hierarchy.dendrogram return value now also includes leaf color information in leaves_color_list.

    scipy.interpolate improvements

    scipy.interpolate.interp1d has a new method nearest-up, similar to the existing method nearest but rounds half-integers up instead of down.

    scipy.io improvements

    Support has been added for reading arbitrary bit depth integer PCM WAV files from 1- to 32-bit, including the commonly-requested 24-bit depth.

    scipy.linalg improvements

    The new function scipy.linalg.matmul_toeplitz uses the FFT to compute the product of a Toeplitz matrix with another matrix.

    scipy.linalg.sqrtm and scipy.linalg.logm have performance improvements thanks to additional Cython code.

    Python LAPACK wrappers have been added for pptrf, pptrs, ppsv, pptri, and ppcon.

    scipy.linalg.norm and the svd family of functions will now use 64-bit integer backends when available.

    scipy.ndimage improvements

    scipy.ndimage.convolve, scipy.ndimage.correlate and their 1d counterparts now accept both complex-valued images and/or complex-valued filter kernels. All convolution-based filters also now accept complex-valued inputs (e.g. gaussian_filter, uniform_filter, etc.).

    Multiple fixes and enhancements to boundary handling were introduced to scipy.ndimage interpolation functions (i.e. affine_transform, geometric_transform, map_coordinates, rotate, shift, zoom).

    A new boundary mode, grid-wrap was added which wraps images periodically, using a period equal to the shape of the input image grid. This is in contrast to the existing wrap mode which uses a period that is one sample smaller than the original signal extent along each dimension.

    A long-standing bug in the reflect boundary condition has been fixed and the mode grid-mirror was introduced as a synonym for reflect.

    A new boundary mode, grid-constant is now available. This is similar to the existing ndimage constant mode, but interpolation will still performed at coordinate values outside of the original image extent. This grid-constant mode is consistent with OpenCV's BORDER_CONSTANT mode and scikit-image's constant mode.

    Spline pre-filtering (used internally by ndimage interpolation functions when order >= 2), now supports all boundary modes rather than always defaulting to mirror boundary conditions. The standalone functions spline_filter and spline_filter1d have analytical boundary conditions that match modes mirror, grid-wrap and reflect.

    scipy.ndimage interpolation functions now accept complex-valued inputs. In this case, the interpolation is applied independently to the real and imaginary components.

    The ndimage tutorials (https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been updated with new figures to better clarify the exact behavior of all of the interpolation boundary modes.

    scipy.ndimage.zoom now has a grid_mode option that changes the coordinate of the center of the first pixel along an axis from 0 to 0.5. This allows resizing in a manner that is consistent with the behavior of scikit-image's resize and rescale functions (and OpenCV's cv2.resize).

    scipy.optimize improvements

    scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS C++ library. method='highs-ds' uses a high performance dual revised simplex implementation (HSOL), method='highs-ipm' uses an interior-point method with crossover, and method='highs' chooses between the two automatically. These methods are typically much faster and often exceed the accuracy of other linprog methods, so we recommend explicitly specifying one of these three method values when using linprog.

    scipy.optimize.quadratic_assignment has been added for approximate solution of the quadratic assignment problem.

    scipy.optimize.linear_sum_assignment now has a substantially reduced overhead for small cost matrix sizes

    scipy.optimize.least_squares has improved performance when the user provides the jacobian as a sparse jacobian already in csr_matrix format

    scipy.optimize.linprog now has an rr_method argument for specification of the method used for redundancy handling, and a new method for this purpose is available based on the interpolative decomposition approach.

    scipy.signal improvements

    scipy.signal.gammatone has been added to design FIR or IIR filters that model the human auditory system.

    scipy.signal.iircomb has been added to design IIR peaking/notching comb filters that can boost/attenuate a frequency from a signal.

    scipy.signal.sosfilt performance has been improved to avoid some previously- observed slowdowns

    scipy.signal.windows.taylor has been added--the Taylor window function is commonly used in radar digital signal processing

    scipy.signal.gauss_spline now supports list type input for consistency with other related SciPy functions

    scipy.signal.correlation_lags has been added to allow calculation of the lag/ displacement indices array for 1D cross-correlation.

    scipy.sparse improvements

    A solver for the minimum weight full matching problem for bipartite graphs, also known as the linear assignment problem, has been added in scipy.sparse.csgraph.min_weight_full_bipartite_matching. In particular, this provides functionality analogous to that of scipy.optimize.linear_sum_assignment, but with improved performance for sparse inputs, and the ability to handle inputs whose dense representations would not fit in memory.

    The time complexity of scipy.sparse.block_diag has been improved dramatically from quadratic to linear.

    scipy.sparse.linalg improvements

    The vendored version of SuperLU has been updated

    scipy.fft improvements

    The vendored pocketfft library now supports compiling with ARM neon vector extensions and has improved thread pool behavior.

    scipy.spatial improvements

    The python implementation of KDTree has been dropped and KDTree is now implemented in terms of cKDTree. You can now expect cKDTree-like performance by default. This also means sys.setrecursionlimit no longer needs to be increased for querying large trees.

    transform.Rotation has been updated with support for Modified Rodrigues Parameters alongside the existing rotation representations (PR gh-12667).

    scipy.spatial.transform.Rotation has been partially cythonized, with some performance improvements observed

    scipy.spatial.distance.cdist has improved performance with the minkowski metric, especially for p-norm values of 1 or 2.

    scipy.stats improvements

    New distributions have been added to scipy.stats:

    • The asymmetric Laplace continuous distribution has been added as scipy.stats.laplace_asymmetric.
    • The negative hypergeometric distribution has been added as scipy.stats.nhypergeom.
    • The multivariate t distribution has been added as scipy.stats.multivariate_t.
    • The multivariate hypergeometric distribution has been added as scipy.stats.multivariate_hypergeom.

    The fit method has been overridden for several distributions (laplace, pareto, rayleigh, invgauss, logistic, gumbel_l, gumbel_r); they now use analytical, distribution-specific maximum likelihood estimation results for greater speed and accuracy than the generic (numerical optimization) implementation.

    The one-sample Cramér-von Mises test has been added as scipy.stats.cramervonmises.

    An option to compute one-sided p-values was added to scipy.stats.ttest_1samp, scipy.stats.ttest_ind_from_stats, scipy.stats.ttest_ind and scipy.stats.ttest_rel.

    The function scipy.stats.kendalltau now has an option to compute Kendall's tau-c (also known as Stuart's tau-c), and support has been added for exact p-value calculations for sample sizes > 171.

    stats.trapz was renamed to stats.trapezoid, with the former name retained as an alias for backwards compatibility reasons.

    The function scipy.stats.linregress now includes the standard error of the intercept in its return value.

    The _logpdf, _sf, and _isf methods have been added to scipy.stats.nakagami; _sf and _isf methods also added to scipy.stats.gumbel_r

    The sf method has been added to scipy.stats.levy and scipy.stats.levy_l for improved precision.

    scipy.stats.binned_statistic_dd performance improvements for the following computed statistics: max, min, median, and std.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of these improvements to scipy.stats.

    Deprecated features

    scipy.spatial changes

    Calling KDTree.query with k=None to find all neighbours is deprecated. Use KDTree.query_ball_point instead.

    distance.wminkowski was deprecated; use distance.minkowski and supply weights with the w keyword instead.

    Backwards incompatible changes

    scipy changes

    Using scipy.fft as a function aliasing numpy.fft.fft was removed after being deprecated in SciPy 1.4.0. As a result, the scipy.fft submodule must be explicitly imported now, in line with other SciPy subpackages.

    scipy.signal changes

    The output of decimate, lfilter_zi, lfiltic, sos2tf, and sosfilt_zi have been changed to match numpy.result_type of their inputs.

    The window function slepian was removed. It had been deprecated since SciPy 1.1.

    scipy.spatial changes

    cKDTree.query now returns 64-bit rather than 32-bit integers on Windows, making behaviour consistent between platforms (PR gh-12673).

    scipy.stats changes

    The frechet_l and frechet_r distributions were removed. They were deprecated since SciPy 1.0.

    Other changes

    setup_requires was removed from setup.py. This means that users invoking python setup.py install without having numpy already installed will now get an error, rather than having numpy installed for them via easy_install. This install method was always fragile and problematic, users are encouraged to use pip when installing from source.

    • Fixed a bug in scipy.optimize.dual_annealing accept_reject calculation that caused uphill jumps to be accepted less frequently.
    • The time required for (un)pickling of scipy.stats.rv_continuous, scipy.stats.rv_discrete, and scipy.stats.rv_frozen has been significantly reduced (gh12550). Inheriting subclasses should note that __setstate__ no longer calls __init__ upon unpickling.

    Authors

    • @endolith
    • @vkk800
    • aditya +
    • George Bateman +
    • Christoph Baumgarten
    • Peter Bell
    • Tobias Biester +
    • Keaton J. Burns +
    • Evgeni Burovski
    • Rüdiger Busche +
    • Matthias Bussonnier
    • Dominic C +
    • Corallus Caninus +
    • CJ Carey
    • Thomas A Caswell
    • chapochn +
    • Lucía Cheung
    • Zach Colbert +
    • Coloquinte +
    • Yannick Copin +
    • Devin Crowley +
    • Terry Davis +
    • Michaël Defferrard +
    • devonwp +
    • Didier +
    • divenex +
    • Thomas Duvernay +
    • Eoghan O'Connell +
    • Gökçen Eraslan
    • Kristian Eschenburg +
    • Ralf Gommers
    • Thomas Grainger +
    • GreatV +
    • Gregory Gundersen +
    • h-vetinari +
    • Matt Haberland
    • Mark Harfouche +
    • He He +
    • Alex Henrie
    • Chun-Ming Huang +
    • Martin James McHugh III +
    • Alex Izvorski +
    • Joey +
    • ST John +
    • Jonas Jonker +
    • Julius Bier Kirkegaard
    • Marcin Konowalczyk +
    • Konrad0
    • Sam Van Kooten +
    • Sergey Koposov +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Loïc Estève
    • Jean-Luc Margot +
    • MarkusKoebis +
    • Nikolay Mayorov
    • G. D. McBain
    • Andrew McCluskey +
    • Nicholas McKibben
    • Sturla Molden
    • Denali Molitor +
    • Eric Moore
    • Shashaank N +
    • Prashanth Nadukandi +
    • nbelakovski +
    • Andrew Nelson
    • Nick +
    • Nikola Forró +
    • odidev
    • ofirr +
    • Sambit Panda
    • Dima Pasechnik
    • Tirth Patel +
    • Matti Picus
    • Paweł Redzyński +
    • Vladimir Philipenko +
    • Philipp Thölke +
    • Ilhan Polat
    • Eugene Prilepin +
    • Vladyslav Rachek
    • Ram Rachum +
    • Tyler Reddy
    • Martin Reinecke +
    • Simon Segerblom Rex +
    • Lucas Roberts
    • Benjamin Rowell +
    • Eli Rykoff +
    • Atsushi Sakai
    • Moritz Schulte +
    • Daniel B. Smith
    • Steve Smith +
    • Jan Soedingrekso +
    • Victor Stinner +
    • Jose Storopoli +
    • Diana Sukhoverkhova +
    • Søren Fuglede Jørgensen
    • taoky +
    • Mike Taves +
    • Ian Thomas +
    • Will Tirone +
    • Frank Torres +
    • Seth Troisi
    • Ronald van Elburg +
    • Hugo van Kemenade
    • Paul van Mulbregt
    • Saul Ivan Rivas Vega +
    • Pauli Virtanen
    • Jan Vleeshouwers
    • Samuel Wallan
    • Warren Weckesser
    • Ben West +
    • Eric Wieser
    • WillTirone +
    • Levi John Wolf +
    • Zhiqing Xiao
    • Rory Yorke +
    • Yun Wang (Maigo) +
    • Egor Zemlyanoy +
    • ZhihuiChen0903 +
    • Jacob Zhong +

    A total of 122 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(275.28 KB)
    README(71.92 KB)
    scipy-1.6.0rc2-cp37-cp37m-macosx_10_9_x86_64.whl(29.26 MB)
    scipy-1.6.0rc2-cp37-cp37m-manylinux1_i686.whl(23.15 MB)
    scipy-1.6.0rc2-cp37-cp37m-manylinux1_x86_64.whl(26.11 MB)
    scipy-1.6.0rc2-cp37-cp37m-manylinux2014_aarch64.whl(24.75 MB)
    scipy-1.6.0rc2-cp37-cp37m-win32.whl(28.04 MB)
    scipy-1.6.0rc2-cp37-cp37m-win_amd64.whl(31.03 MB)
    scipy-1.6.0rc2-cp38-cp38-macosx_10_9_x86_64.whl(29.31 MB)
    scipy-1.6.0rc2-cp38-cp38-manylinux1_i686.whl(23.08 MB)
    scipy-1.6.0rc2-cp38-cp38-manylinux1_x86_64.whl(25.98 MB)
    scipy-1.6.0rc2-cp38-cp38-manylinux2014_aarch64.whl(24.85 MB)
    scipy-1.6.0rc2-cp38-cp38-win32.whl(28.16 MB)
    scipy-1.6.0rc2-cp38-cp38-win_amd64.whl(31.17 MB)
    scipy-1.6.0rc2-cp39-cp39-macosx_10_9_x86_64.whl(29.43 MB)
    scipy-1.6.0rc2-cp39-cp39-manylinux1_i686.whl(23.17 MB)
    scipy-1.6.0rc2-cp39-cp39-manylinux1_x86_64.whl(26.03 MB)
    scipy-1.6.0rc2-cp39-cp39-manylinux2014_aarch64.whl(24.84 MB)
    scipy-1.6.0rc2-cp39-cp39-win32.whl(28.16 MB)
    scipy-1.6.0rc2-cp39-cp39-win_amd64.whl(31.17 MB)
    scipy-1.6.0rc2.tar.gz(26.01 MB)
    scipy-1.6.0rc2.tar.xz(17.90 MB)
    scipy-1.6.0rc2.zip(27.87 MB)
  • v1.6.0rc1(Dec 11, 2020)

    SciPy 1.6.0 Release Notes

    Note: Scipy 1.6.0 is not released yet!

    SciPy 1.6.0 is the culmination of 6 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.6.x branch, and on adding new features on the master branch.

    This release requires Python 3.7+ and NumPy 1.16.5 or greater.

    For running on PyPy, PyPy3 6.0+ is required.

    Highlights of this release

    • scipy.ndimage improvements: Fixes and ehancements to boundary extension modes for interpolation functions. Support for complex-valued inputs in many filtering and interpolation functions. New grid_mode option for scipy.ndimage.zoom to enable results consistent with scikit-image's rescale.
    • scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS library.
    • scipy.stats improvements including new distributions, a new test, and enhancements to existing distributions and tests

    New features

    scipy.special improvements

    scipy.special now has improved support for 64-bit LAPACK backend

    scipy.odr improvements

    scipy.odr now has support for 64-bit integer BLAS

    scipy.odr.ODR has gained an optional overwrite argument so that existing files may be overwritten.

    scipy.integrate improvements

    Some renames of functions with poor names were done, with the old names retained without being in the reference guide for backwards compatibility reasons:

    • integrate.simps was renamed to integrate.simpson
    • integrate.trapz was renamed to integrate.trapezoid
    • integrate.cumtrapz was renamed to integrate.cumulative_trapezoid

    scipy.cluster improvements

    scipy.cluster.hierarchy.DisjointSet has been added for incremental connectivity queries.

    scipy.cluster.hierarchy.dendrogram return value now also includes leaf color information in leaves_color_list.

    scipy.interpolate improvements

    scipy.interpolate.interp1d has a new method nearest-up, similar to the existing method nearest but rounds half-integers up instead of down.

    scipy.io improvements

    Support has been added for reading arbitrary bit depth integer PCM WAV files from 1- to 32-bit, including the commonly-requested 24-bit depth.

    scipy.linalg improvements

    The new function scipy.linalg.matmul_toeplitz uses the FFT to compute the product of a Toeplitz matrix with another matrix.

    scipy.linalg.sqrtm and scipy.linalg.logm have performance improvements thanks to additional Cython code.

    Python LAPACK wrappers have been added for pptrf, pptrs, ppsv, pptri, and ppcon.

    scipy.linalg.norm and the svd family of functions will now use 64-bit integer backends when available.

    scipy.ndimage improvements

    scipy.ndimage.convolve, scipy.ndimage.correlate and their 1d counterparts now accept both complex-valued images and/or complex-valued filter kernels. All convolution-based filters also now accept complex-valued inputs (e.g. gaussian_filter, uniform_filter, etc.).

    Multiple fixes and enhancements to boundary handling were introduced to scipy.ndimage interpolation functions (i.e. affine_transform, geometric_transform, map_coordinates, rotate, shift, zoom).

    A new boundary mode, grid-wrap was added which wraps images periodically, using a period equal to the shape of the input image grid. This is in contrast to the existing wrap mode which uses a period that is one sample smaller than the original signal extent along each dimension.

    A long-standing bug in the reflect boundary condition has been fixed and the mode grid-mirror was introduced as a synonym for reflect.

    A new boundary mode, grid-constant is now available. This is similar to the existing ndimage constant mode, but interpolation will still performed at coordinate values outside of the original image extent. This grid-constant mode is consistent with OpenCV's BORDER_CONSTANT mode and scikit-image's constant mode.

    Spline pre-filtering (used internally by ndimage interpolation functions when order >= 2), now supports all boundary modes rather than always defaulting to mirror boundary conditions. The standalone functions spline_filter and spline_filter1d have analytical boundary conditions that match modes mirror, grid-wrap and reflect.

    scipy.ndimage interpolation functions now accept complex-valued inputs. In this case, the interpolation is applied independently to the real and imaginary components.

    The ndimage tutorials (https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been updated with new figures to better clarify the exact behavior of all of the interpolation boundary modes.

    scipy.ndimage.zoom now has a grid_mode option that changes the coordinate of the center of the first pixel along an axis from 0 to 0.5. This allows resizing in a manner that is consistent with the behavior of scikit-image's resize and rescale functions (and OpenCV's cv2.resize).

    scipy.optimize improvements

    scipy.optimize.linprog has fast, new methods for large, sparse problems from the HiGHS C++ library. method='highs-ds' uses a high performance dual revised simplex implementation (HSOL), method='highs-ipm' uses an interior-point method with crossover, and method='highs' chooses between the two automatically. These methods are typically much faster and often exceed the accuracy of other linprog methods, so we recommend explicitly specifying one of these three method values when using linprog.

    scipy.optimize.quadratic_assignment has been added for approximate solution of the quadratic assignment problem.

    scipy.optimize.linear_sum_assignment now has a substantially reduced overhead for small cost matrix sizes

    scipy.optimize.least_squares has improved performance when the user provides the jacobian as a sparse jacobian already in csr_matrix format

    scipy.optimize.linprog now has an rr_method argument for specification of the method used for redundancy handling, and a new method for this purpose is available based on the interpolative decomposition approach.

    scipy.signal improvements

    scipy.signal.gammatone has been added to design FIR or IIR filters that model the human auditory system.

    scipy.signal.iircomb has been added to design IIR peaking/notching comb filters that can boost/attenuate a frequency from a signal.

    scipy.signal.sosfilt performance has been improved to avoid some previously- observed slowdowns

    scipy.signal.windows.taylor has been added--the Taylor window function is commonly used in radar digital signal processing

    scipy.signal.gauss_spline now supports list type input for consistency with other related SciPy functions

    scipy.signal.correlation_lags has been added to allow calculation of the lag/ displacement indices array for 1D cross-correlation.

    scipy.sparse improvements

    A solver for the minimum weight full matching problem for bipartite graphs, also known as the linear assignment problem, has been added in scipy.sparse.csgraph.min_weight_full_bipartite_matching. In particular, this provides functionality analogous to that of scipy.optimize.linear_sum_assignment, but with improved performance for sparse inputs, and the ability to handle inputs whose dense representations would not fit in memory.

    The time complexity of scipy.sparse.block_diag has been improved dramatically from quadratic to linear.

    scipy.sparse.linalg improvements

    The vendored version of SuperLU has been updated

    scipy.fft improvements

    The vendored pocketfft library now supports compiling with ARM neon vector extensions and has improved thread pool behavior.

    scipy.spatial improvements

    The python implementation of KDTree has been dropped and KDTree is now implemented in terms of cKDTree. You can now expect cKDTree-like performance by default. This also means sys.setrecursionlimit no longer needs to be increased for querying large trees.

    transform.Rotation has been updated with support for Modified Rodrigues Parameters alongside the existing rotation representations (PR gh-12667).

    scipy.spatial.transform.Rotation has been partially cythonized, with some performance improvements observed

    scipy.spatial.distance.cdist has improved performance with the minkowski metric, especially for p-norm values of 1 or 2.

    scipy.stats improvements

    New distributions have been added to scipy.stats:

    • The asymmetric Laplace continuous distribution has been added as scipy.stats.laplace_asymmetric.
    • The negative hypergeometric distribution has been added as scipy.stats.nhypergeom.
    • The multivariate t distribution has been added as scipy.stats.multivariate_t.
    • The multivariate hypergeometric distribution has been added as scipy.stats.multivariate_hypergeom.

    The fit method has been overridden for several distributions (laplace, pareto, rayleigh, invgauss, logistic, gumbel_l, gumbel_r); they now use analytical, distribution-specific maximum likelihood estimation results for greater speed and accuracy than the generic (numerical optimization) implementation.

    The one-sample Cramér-von Mises test has been added as scipy.stats.cramervonmises.

    An option to compute one-sided p-values was added to scipy.stats.ttest_1samp, scipy.stats.ttest_ind_from_stats, scipy.stats.ttest_ind and scipy.stats.ttest_rel.

    The function scipy.stats.kendalltau now has an option to compute Kendall's tau-c (also known as Stuart's tau-c), and support has been added for exact p-value calculations for sample sizes > 171.

    stats.trapz was renamed to stats.trapezoid, with the former name retained as an alias for backwards compatibility reasons.

    The function scipy.stats.linregress now includes the standard error of the intercept in its return value.

    The _logpdf, _sf, and _isf methods have been added to scipy.stats.nakagami; _sf and _isf methods also added to scipy.stats.gumbel_r

    The sf method has been added to scipy.stats.levy and scipy.stats.levy_l for improved precision.

    scipy.stats.binned_statistic_dd performance improvements for the following computed statistics: max, min, median, and std.

    We gratefully acknowledge the Chan-Zuckerberg Initiative Essential Open Source Software for Science program for supporting many of these improvements to scipy.stats.

    Deprecated features

    scipy.spatial changes

    Calling KDTree.query with k=None to find all neighbours is deprecated. Use KDTree.query_ball_point instead.

    distance.wminkowski was deprecated; use distance.minkowski and supply weights with the w keyword instead.

    Backwards incompatible changes

    scipy changes

    Using scipy.fft as a function aliasing numpy.fft.fft was removed after being deprecated in SciPy 1.4.0. As a result, the scipy.fft submodule must be explicitly imported now, in line with other SciPy subpackages.

    scipy.signal changes

    The output of decimate, lfilter_zi, lfiltic, sos2tf, and sosfilt_zi have been changed to match numpy.result_type of their inputs.

    The window function slepian was removed. It had been deprecated since SciPy 1.1.

    scipy.spatial changes

    cKDTree.query now returns 64-bit rather than 32-bit integers on Windows, making behaviour consistent between platforms (PR gh-12673).

    scipy.stats changes

    The frechet_l and frechet_r distributions were removed. They were deprecated since SciPy 1.0.

    Other changes

    setup_requires was removed from setup.py. This means that users invoking python setup.py install without having numpy already installed will now get an error, rather than having numpy installed for them via easy_install. This install method was always fragile and problematic, users are encouraged to use pip when installing from source.

    • Fixed a bug in scipy.optimize.dual_annealing accept_reject calculation that caused uphill jumps to be accepted less frequently.
    • The time required for (un)pickling of scipy.stats.rv_continuous, scipy.stats.rv_discrete, and scipy.stats.rv_frozen has been significantly reduced (gh12550). Inheriting subclasses should note that __setstate__ no longer calls __init__ upon unpickling.

    Authors

    • @endolith
    • @vkk800
    • aditya +
    • George Bateman +
    • Christoph Baumgarten
    • Peter Bell
    • Tobias Biester +
    • Keaton J. Burns +
    • Evgeni Burovski
    • Rüdiger Busche +
    • Matthias Bussonnier
    • Dominic C +
    • Corallus Caninus +
    • CJ Carey
    • Thomas A Caswell
    • chapochn +
    • Lucía Cheung
    • Zach Colbert +
    • Coloquinte +
    • Yannick Copin +
    • Devin Crowley +
    • Terry Davis +
    • Michaël Defferrard +
    • devonwp +
    • Didier +
    • divenex +
    • Thomas Duvernay +
    • Eoghan O'Connell +
    • Gökçen Eraslan
    • Kristian Eschenburg +
    • Ralf Gommers
    • Thomas Grainger +
    • GreatV +
    • Gregory Gundersen +
    • h-vetinari +
    • Matt Haberland
    • Mark Harfouche +
    • He He +
    • Alex Henrie
    • Chun-Ming Huang +
    • Martin James McHugh III +
    • Alex Izvorski +
    • Joey +
    • ST John +
    • Jonas Jonker +
    • Julius Bier Kirkegaard
    • Marcin Konowalczyk +
    • Konrad0
    • Sam Van Kooten +
    • Sergey Koposov +
    • Peter Mahler Larsen
    • Eric Larson
    • Antony Lee
    • Gregory R. Lee
    • Loïc Estève
    • Jean-Luc Margot +
    • MarkusKoebis +
    • Nikolay Mayorov
    • G. D. McBain
    • Andrew McCluskey +
    • Nicholas McKibben
    • Sturla Molden
    • Denali Molitor +
    • Eric Moore
    • Shashaank N +
    • Prashanth Nadukandi +
    • nbelakovski +
    • Andrew Nelson
    • Nick +
    • Nikola Forró +
    • odidev
    • ofirr +
    • Sambit Panda
    • Dima Pasechnik
    • Tirth Patel +
    • Paweł Redzyński +
    • Vladimir Philipenko +
    • Philipp Thölke +
    • Ilhan Polat
    • Eugene Prilepin +
    • Vladyslav Rachek
    • Ram Rachum +
    • Tyler Reddy
    • Martin Reinecke +
    • Simon Segerblom Rex +
    • Lucas Roberts
    • Benjamin Rowell +
    • Eli Rykoff +
    • Atsushi Sakai
    • Moritz Schulte +
    • Daniel B. Smith
    • Steve Smith +
    • Jan Soedingrekso +
    • Victor Stinner +
    • Jose Storopoli +
    • Diana Sukhoverkhova +
    • Søren Fuglede Jørgensen
    • taoky +
    • Mike Taves +
    • Ian Thomas +
    • Will Tirone +
    • Frank Torres +
    • Seth Troisi
    • Ronald van Elburg +
    • Hugo van Kemenade
    • Paul van Mulbregt
    • Saul Ivan Rivas Vega +
    • Pauli Virtanen
    • Jan Vleeshouwers
    • Samuel Wallan
    • Warren Weckesser
    • Ben West +
    • Eric Wieser
    • WillTirone +
    • Levi John Wolf +
    • Zhiqing Xiao
    • Rory Yorke +
    • Yun Wang (Maigo) +
    • Egor Zemlyanoy +
    • ZhihuiChen0903 +
    • Jacob Zhong +

    A total of 121 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(271.22 KB)
    README(70.97 KB)
    scipy-1.6.0rc1-cp37-cp37m-macosx_10_9_x86_64.whl(29.26 MB)
    scipy-1.6.0rc1-cp37-cp37m-manylinux1_i686.whl(23.15 MB)
    scipy-1.6.0rc1-cp37-cp37m-manylinux1_x86_64.whl(26.11 MB)
    scipy-1.6.0rc1-cp37-cp37m-manylinux2014_aarch64.whl(24.75 MB)
    scipy-1.6.0rc1-cp37-cp37m-win32.whl(28.04 MB)
    scipy-1.6.0rc1-cp37-cp37m-win_amd64.whl(31.03 MB)
    scipy-1.6.0rc1-cp38-cp38-macosx_10_9_x86_64.whl(29.31 MB)
    scipy-1.6.0rc1-cp38-cp38-manylinux1_i686.whl(23.08 MB)
    scipy-1.6.0rc1-cp38-cp38-manylinux1_x86_64.whl(25.98 MB)
    scipy-1.6.0rc1-cp38-cp38-manylinux2014_aarch64.whl(24.85 MB)
    scipy-1.6.0rc1-cp38-cp38-win32.whl(28.16 MB)
    scipy-1.6.0rc1-cp38-cp38-win_amd64.whl(31.17 MB)
    scipy-1.6.0rc1-cp39-cp39-macosx_10_9_x86_64.whl(29.43 MB)
    scipy-1.6.0rc1-cp39-cp39-manylinux1_i686.whl(23.17 MB)
    scipy-1.6.0rc1-cp39-cp39-manylinux1_x86_64.whl(26.03 MB)
    scipy-1.6.0rc1-cp39-cp39-manylinux2014_aarch64.whl(24.84 MB)
    scipy-1.6.0rc1-cp39-cp39-win32.whl(28.16 MB)
    scipy-1.6.0rc1-cp39-cp39-win_amd64.whl(31.17 MB)
    scipy-1.6.0rc1.tar.gz(26.01 MB)
    scipy-1.6.0rc1.tar.xz(17.90 MB)
    scipy-1.6.0rc1.zip(27.87 MB)
  • v1.5.4(Nov 5, 2020)

    SciPy 1.5.4 Release Notes

    SciPy 1.5.4 is a bug-fix release with no new features compared to 1.5.3. Importantly, wheels are now available for Python 3.9 and a more complete fix has been applied for issues building with XCode 12.

    Authors

    • Peter Bell
    • CJ Carey
    • Andrew McCluskey +
    • Andrew Nelson
    • Tyler Reddy
    • Eli Rykoff +
    • Ian Thomas +

    A total of 7 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(6.13 KB)
    README(8.33 KB)
    scipy-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl(27.44 MB)
    scipy-1.5.4-cp36-cp36m-manylinux1_i686.whl(21.76 MB)
    scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl(24.68 MB)
    scipy-1.5.4-cp36-cp36m-manylinux2014_aarch64.whl(23.32 MB)
    scipy-1.5.4-cp36-cp36m-win32.whl(26.94 MB)
    scipy-1.5.4-cp36-cp36m-win_amd64.whl(29.78 MB)
    scipy-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl(27.34 MB)
    scipy-1.5.4-cp37-cp37m-manylinux1_i686.whl(21.75 MB)
    scipy-1.5.4-cp37-cp37m-manylinux1_x86_64.whl(24.66 MB)
    scipy-1.5.4-cp37-cp37m-manylinux2014_aarch64.whl(23.30 MB)
    scipy-1.5.4-cp37-cp37m-win32.whl(26.94 MB)
    scipy-1.5.4-cp37-cp37m-win_amd64.whl(29.78 MB)
    scipy-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl(27.61 MB)
    scipy-1.5.4-cp38-cp38-manylinux1_i686.whl(21.68 MB)
    scipy-1.5.4-cp38-cp38-manylinux1_x86_64.whl(24.55 MB)
    scipy-1.5.4-cp38-cp38-manylinux2014_aarch64.whl(23.39 MB)
    scipy-1.5.4-cp38-cp38-win32.whl(27.06 MB)
    scipy-1.5.4-cp38-cp38-win_amd64.whl(29.91 MB)
    scipy-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl(27.75 MB)
    scipy-1.5.4-cp39-cp39-manylinux1_i686.whl(21.79 MB)
    scipy-1.5.4-cp39-cp39-manylinux1_x86_64.whl(24.63 MB)
    scipy-1.5.4-cp39-cp39-manylinux2014_aarch64.whl(23.38 MB)
    scipy-1.5.4-cp39-cp39-win32.whl(27.06 MB)
    scipy-1.5.4-cp39-cp39-win_amd64.whl(29.91 MB)
    scipy-1.5.4.tar.gz(24.06 MB)
    scipy-1.5.4.tar.xz(16.82 MB)
    scipy-1.5.4.zip(25.71 MB)
  • v1.5.3(Oct 17, 2020)

    SciPy 1.5.3 Release Notes

    SciPy 1.5.3 is a bug-fix release with no new features compared to 1.5.2. In particular, Linux ARM64 wheels are now available and a compatibility issue with XCode 12 has been fixed.

    Authors

    • Peter Bell
    • CJ Carey
    • Thomas Duvernay +
    • Gregory Lee
    • Eric Moore
    • odidev
    • Dima Pasechnik
    • Tyler Reddy
    • Simon Segerblom Rex +
    • Daniel B. Smith
    • Will Tirone +
    • Warren Weckesser

    A total of 12 people contributed to this release. People with a "+" by their names contributed a patch for the first time. This list of names is automatically generated, and may not be fully complete.

    Source code(tar.gz)
    Source code(zip)
    Changelog(13.05 KB)
    README(9.01 KB)
    scipy-1.5.3-cp36-cp36m-macosx_10_9_x86_64.whl(27.43 MB)
    scipy-1.5.3-cp36-cp36m-manylinux1_i686.whl(21.76 MB)
    scipy-1.5.3-cp36-cp36m-manylinux1_x86_64.whl(24.68 MB)
    scipy-1.5.3-cp36-cp36m-manylinux2014_aarch64.whl(23.32 MB)
    scipy-1.5.3-cp36-cp36m-win32.whl(26.94 MB)
    scipy-1.5.3-cp36-cp36m-win_amd64.whl(29.77 MB)
    scipy-1.5.3-cp37-cp37m-macosx_10_9_x86_64.whl(27.34 MB)
    scipy-1.5.3-cp37-cp37m-manylinux1_i686.whl(21.75 MB)
    scipy-1.5.3-cp37-cp37m-manylinux1_x86_64.whl(24.66 MB)
    scipy-1.5.3-cp37-cp37m-manylinux2014_aarch64.whl(23.30 MB)
    scipy-1.5.3-cp37-cp37m-win32.whl(26.94 MB)
    scipy-1.5.3-cp37-cp37m-win_amd64.whl(29.78 MB)
    scipy-1.5.3-cp38-cp38-macosx_10_9_x86_64.whl(27.61 MB)
    scipy-1.5.3-cp38-cp38-manylinux1_i686.whl(21.68 MB)
    scipy-1.5.3-cp38-cp38-manylinux1_x86_64.whl(24.55 MB)
    scipy-1.5.3-cp38-cp38-manylinux2014_aarch64.whl(23.39 MB)
    scipy-1.5.3-cp38-cp38-win32.whl(27.06 MB)
    scipy-1.5.3-cp38-cp38-win_amd64.whl(29.91 MB)
    scipy-1.5.3.tar.gz(24.06 MB)
    scipy-1.5.3.tar.xz(16.81 MB)
    scipy-1.5.3.zip(25.71 MB)
Quanser Labs Robotic Arm With Python

Quanser-Labs-Robotic-Arm As a team, we programmed a Robotic-Arm in Python on the

1 Jul 11, 2022
Learn the basics of Python. These tutorials are for Python beginners. so even if you have no prior knowledge of Python, you won’t face any difficulty understanding these tutorials.

01_Python_Introduction Introduction 👋 Python is a modern, robust, high level programming language. It is very easy to pick up even if you are complet

Milaan Parmar / Милан пармар / _米兰 帕尔马 245 Dec 30, 2022
Hashcrack: Hash Bruteforse tool using python

HashCrack Hash Bruteforse tool Usage hashcrack.py -n 6 -c lower -l 5 -a md5 -t 3

Lev 1 May 04, 2022
Mdisk - 🚧 On Construction 🚧

Mdisk Install For Package pip install mdisk pip install git+https://github.com/HeimanPictures/Mdisk.git Usage You can use this as python module or via

AkKiL 6 Aug 08, 2022
Node editor view image node

A Blender addon to quickly view images from image nodes in Blender's image viewer.

5 Nov 27, 2022
Medical appointments No-Show classifier

Medical Appointments No-shows Why do 20% of patients miss their scheduled appointments? A person makes a doctor appointment, receives all the instruct

4 Apr 20, 2022
A script to add issues to a project in Github based on label or status.

Add Github Issues to Project (Beta) A python script to move Github issues to a next-gen (beta) Github Project Getting Started These instructions will

Kate Donaldson 3 Jan 16, 2022
This repository contains completed Python projects

My Python projects This repository contains completed Python projects: 1) Build projects Guide for building projects into executable files 2) Calculat

Igor Yunusov 8 Nov 04, 2021
Esercizi di Python svolti per il biennio di Tecnologie Informatiche.

Esercizi di Python Un piccolo aiuto per Sofia che nel 2° quadrimestre inizierà Python :) Questo repository (termine tecnico di Git) puoi trovare tutti

Leonardo Essam Dei Rossi 2 Nov 07, 2022
Ingest openldap data into bloodhound

Bloodhound for Linux Ingest a dumped OpenLDAP ldif into neo4j to be visualized in Bloodhound. Usage: ./ldif_to_neo4j.py ./sample.ldif | cypher-shell -

Guillaume Quéré 71 Nov 09, 2022
⏰ Shutdown Timer is an application that you can shutdown, restart, logoff, and hibernate your computer with a timer.

Shutdown Timer is a an application that you can shutdown, restart, logoff, and hibernate your computer with a timer. After choosing an action from the

Mehmet Güdük 5 Jun 27, 2022
Cylc: a workflow engine for cycling systems

Cylc: a workflow engine for cycling systems. Repository master branch: core meta-scheduler component of cylc-8 (in development); Repository 7.8.x branch: full cylc-7 system.

The Cylc Workflow Engine 205 Dec 20, 2022
2021华为软件精英挑战赛 程序输出分析器

AutoGrader 0.2.0更新:加入资源分配溢出检测,如果发生资源溢出会输出溢出发生的位置。 如果通过检测,会显示通过符号 如果没有通过检测,会显示警告,并输出溢出发生的位置和操作

54 Aug 14, 2022
Ballcone is a fast and lightweight server-side Web analytics solution.

Ballcone Ballcone is a fast and lightweight server-side Web analytics solution. It requires no JavaScript on your website. Screenshots Design Goals Si

Dmitry Ustalov 49 Dec 11, 2022
Minimalist BERT implementation assignment for CS11-747

minbert Assignment by Zhengbao Jiang, Shuyan Zhou, and Ritam Dutt This is an exercise in developing a minimalist version of BERT, part of Carnegie Mel

Graham Neubig 51 Jan 03, 2023
Data Applications Project

DBMS project- Hotel Franchise Data and application project By TEAM Kurukunda Bhargavi Pamulapati Pallavi Greeshma Amaraneni What is this project about

Greeshma 1 Nov 28, 2021
This repository can help you made a PocketMine-MP Server with Termux apps!

Hello This GitHub repository can made you a Server PocketMine-MP On development! How to Install Open Termux Type "pkg install git && python" If python

1 Mar 04, 2022
Nfog - Scriptable Database-Driven NFO Generator for Movies and TV

nfog Scriptable Database-Driven NFO Generator for Movies and TV. Installation pi

6 Oct 08, 2022
Handwrite - Type in your Handwriting!

Handwrite - Type in your Handwriting! Ever had those long-winded assignments, that the teacher always wants handwritten?

coded 7 Dec 06, 2022
An Embedded Linux Project Build and Compile Tool -- An Bitbake UI Extension

Dianshao - An Embedded Linux Project Build and Compile Tool

0 Mar 27, 2022