| Literature DB >> 32015543 |
Pauli Virtanen1, Ralf Gommers2, Travis E Oliphant3,4,5,6,7, Matt Haberland8,9, Tyler Reddy10, David Cournapeau11, Evgeni Burovski12, Pearu Peterson13,14, Warren Weckesser15, Jonathan Bright16, Stéfan J van der Walt15, Matthew Brett17, Joshua Wilson18, K Jarrod Millman15,19, Nikolay Mayorov20, Andrew R J Nelson21, Eric Jones6, Robert Kern6, Eric Larson22, C J Carey23, İlhan Polat24, Yu Feng25, Eric W Moore26, Jake VanderPlas27, Denis Laxalde28, Josef Perktold29, Robert Cimrman30, Ian Henriksen7,31,32, E A Quintero33, Charles R Harris34,35, Anne M Archibald36, Antônio H Ribeiro37, Fabian Pedregosa38, Paul van Mulbregt39.
Abstract
SciPy is an open-source scientific computing library for the Python programming language. Since its initial release in 2001, SciPy has become a de facto standard for leveraging scientific algorithms in Python, with over 600 unique code contributors, thousands of dependent packages, over 100,000 dependent repositories and millions of downloads per year. In this work, we provide an overview of the capabilities and development practices of SciPy 1.0 and highlight some recent technical developments.Entities:
Mesh:
Year: 2020 PMID: 32015543 PMCID: PMC7056644 DOI: 10.1038/s41592-019-0686-2
Source DB: PubMed Journal: Nat Methods ISSN: 1548-7091 Impact factor: 28.547
Fig. 1Major milestones from SciPy’s initial release in 2001 to the release of SciPy 1.0 in 2017.
Note that SciKits and GitHub have been introduced in the Background section; more information about Cython and SciPy subpackages (for example, scipy.sparse) is available in the ‘Architecture and implementation choices’ section, BLAS/LAPACK support is detailed in the ‘Key technical improvements’ section, and continuous integration is discussed in the ‘Test and benchmark suite’ section.
Optimization methods from minimize
| Nelder-Mead | Powell | COBYLA | CG | BFGS | L-BFGS-G | SLSQP | TNC | Newton-CG | dogleg | trust-ncg | trust-exact | trust-Krylov | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Version added | 0.6* | 0.6* | 0.6* | 0.6* | 0.6* | 0.6* | 0.9 | 0.6* | 0.6* | 0.13 | 0.13 | 0.19 | 1.0 |
| Wrapper | ✓ | ✓ | ✓ | ✓ | ✓ | ||||||||
| First derivatives | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| Second derivatives | ~ | ~ | ~ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| Iterative Hessian factorization | ✓ | ✓ | ✓ | ✓ | |||||||||
| Local convergence | L | S | L | S | S* | S* | Q | S* | Q | S* | |||
| Global convergence | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||||
| Trust region | Neither | LS | TR | LS | LS | LS | LS | LS | LS | TR | TR | TR | TR |
| Bound constraints | ✓ | ✓ | ✓ | ✓ | |||||||||
| Equality constraints | ✓ | ||||||||||||
| Inequality constraints | ✓ | ✓ | |||||||||||
| References | [ | [ | [ | [ | [ | [ | [ | [ | [ | [ | [ | [ | [ |
Optimization methods from minimize, which solves problems of the form , where and . ‘Version added’ specifies the algorithm’s first appearance in SciPy. Algorithms with version added “0.6*” were added in version 0.6 or before. ‘Wrapper’ indicates whether the implementation available in SciPy wraps a function written in a compiled language (for example, C or FORTRAN). ‘First derivatives’ and ‘second derivatives’ indicate whether first or second order derivatives are required. When ‘second derivatives’ is flagged with ‘~’, the algorithm accepts but does not require second-order derivatives from the user; it computes an approximation internally and uses it to accelerate method convergence.
‘Iterative Hessian factorization’ denotes algorithms that factorize the Hessian in an iterative way, which does not require explicit matrix factorization or storage of the Hessian. ‘Local convergence’ gives a lower bound on the rate of convergence of the iteration sequence once the iterate is sufficiently close to the solution: linear (L), superlinear (S) and quadratic (Q). Convergence rates denoted S* indicate that the algorithm has a superlinear rate for the parameters used in SciPy, but can achieve a quadratic convergence rate with other parameter choices. ‘Global convergence’ is marked for the algorithms with guarantees of convergence to a stationary point (that is, a point x* for which ); this is not a guarantee of convergence to a global minimum. ‘Lines-search’ (LS) or ‘trust-region’ (TR) indicates which of the two globalization approaches is used by the algorithm. The table also indicates which algorithms can deal with constraints on the variables. We distinguish among bound constraints (), equality constraints () and inequality constraints ().
Fig. 2Python and compiled code volume in SciPy over time.
Fig. 3Results of the scipy.spatial.cKDTree.query benchmark from the introduction of cKDTree to the release of SciPy 1.0.
The benchmark generates a k-d tree from uniformly distributed points in an m-dimensional unit hypercube, then finds the nearest (Euclidean) neighbor in the tree for each of 1,000 query points. Each marker in the figure indicates the execution time of the benchmark for a commit in the master branch of SciPy.
Summary of SciPy Roadmap items following 1.0 release
| SciPy subpackage | Summary of change |
|---|---|
| optimize | A few more high-quality global optimizers |
| fftpack | Reduce overlap with NumPy equivalent |
| linalg | Reduce overlap with NumPy equivalent |
| interpolate | New spline fitting and arithmetic routines |
| interpolate | New transparent tensor-product splines |
| interpolate | New non-uniform rational B-splines |
| interpolate | Mesh refinement and coarsening of B-splines and tensor products |
| signal | Migrate spline functionality to interpolate |
| signal | Second order sections update to match capabilities in other routines |
| linalg | Support a more recent version of LAPACK |
| ndimage | Clarify usage of the ‘data point’ coordinate model, and add additional wrapping modes |
| sparse | Incorporate sparse arrays from Sparse package[ |
| sparse.linalg | Add PROPACK wrappers for faster SVD |
| spatial | Add support for (quaternion) rotation matrices |
| special | Precision improvements for hypergeometric, parabolic cylinder and spheroidal wave functions |