SciPy 1.0: fundamental algorithms for scientific computing in Python — TEI-tagged view

Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric Larson, C J Carey, İlhan Polat, Yu Feng, Eric W. Moore, Jake VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen, E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antônio H. Ribeiro, Fabian Pedregosa, Paul van Mulbregt, Aditya Vijaykumar, Alessandro Pietro Bardelli, Alex Rothberg, Andreas Hilboll, Andreas Kloeckner, Anthony Scopatz, Antony Lee, Ariel Rokem, C. Nathan Woods, Chad Fulton, Charles Masson, Christian Häggström, Clark Fitzgerald, David A. Nicholson, David R. Hagen, Dmitrii V. Pasechnik, Emanuele Olivetti, Eric Martin, Eric Wieser, Fabrice Silva, Felix Lenders, Florian Wilhelm, G. Young, Gavin A. Price, Gert-Ludwig Ingold, Gregory E. Allen, Gregory R. Lee, Hervé Audren, Irvin Probst, Jörg P. Dietrich, Jacob Silterra, James T Webber, Janko Slavič, Joel Nothman, Johannes Buchner, Johannes Kulick, Johannes L. Schönberger, José Vinícius de Miranda Cardoso, Joscha Reimer, Joseph Harrington, Juan Luis Cano Rodríguez, Juan Nunez-Iglesias, Justin Kuczynski, Kevin Tritz, Martin Thoma, Matthew Newville, Matthias Kümmerer, Maximilian Bolingbroke, Michael Tartre, Mikhail Pak, Nathaniel J. Smith, Nikolai Nowaczyk, Nikolay Shebanov, Oleksandr Pavlyk, Per A. Brodtkorb, Perry Lee, Robert T. McGibbon, Roman Feldbauer, Sam Lewis, Sam Tygier, Scott Sievert, Sebastiano Vigna, Stefan Peterson, Surhud More, Tadeusz Pudlik, Takuya Oshima, Thomas J. Pingel, Thomas P. Robitaille, Thomas Spura, Thouis R. Jones, Tim Cera, Tim Leslie, Tiziano Zito, Tom Krauss, Utkarsh Upadhyay, Yaroslav O. Halchenko, Yoshiki Vázquez-Baeza · 2020 · computer-science · doi:10.1038/s41592-019-0686-2 · TEI xml · tagged edition · index · concepts · authors
Where this record's text came from. 2026-08-31 schema-0.3 pass: every quote verified as an exact substring of the staged text and anchored at merge time; concept terms verified present; every edge endpoint an existing node.
45 quotations on this page contain a reference number where the paper printed a superscript. This journal style prints citations as raised numerals — parameters12,13 — and the extraction flattened them into the line, so the sentence reads parameters 12 , 13 . The digits are citation markers and not part of what the author wrote. The quotes keep them for the same reason they keep every other extraction fault: a quote is reproduced exactly or it proves nothing.
Other fields define these differently the same word, defined another way in another discipline
performance 5 fields · application programming interface 3 fields · NumPy 3 fields · continuous integration 2 fields · spline curves 2 fields · CSC 2 fields · and 1 more →
Tags on this paper every tag the record carries, whether or not the words occur in the text below — a number is how many papers in the corpus carry that tag; a tag with no number is unique to this paper
SciPy2 open-source scientific computing library Python programming language scientific algorithms fundamental building blocks NumPy4 higher level scientific libraries application programming interface4 SciPy ecosystem general-purpose programming language scientific features essential infrastructure scikit SciPy library subpackages mathematical building blocks data structures algorithms3 higher-level data analysis functionality cluster subpackage integrate subpackage optimize subpackage signal subpackage sparse3 spatial4 stats subpackage sparse matrix data structures sparse formats CSR2 CSC2 cKDTree k -nearest-neighbor search reimplementing it in C++ performance11 scipy.LowLevelCallable overhead low-level Cython interfaces performance gains interior-point optimizer homogeneous self-dual formulation presolve routine minimize function scipy.optimize.differential_evolution stochastic global optimizer probability distributions piecewise polynomials spline curves2 linear combinations of B-spline basis elements test suite2 collection confidence in the correctness and accuracy continuous integration4 test coverage benchmark suite steering council maintainers institutional memory loss of institutional memory turnover GPU and distributed computing system-or-tool-building173
Method, as described: a modular Python library combining numerical algorithms, specialized data structures, compiled-code wrappers, stable APIs, executable tests, continuous integration, and performance benchmarks

Colour legend

Nature Methods<title level="j">A work — the journal / venue title.
2020<date>A year or date.

Pauli VirtanenpersName, Ralf GommerspersName, Travis E. OliphantpersName, Matt HaberlandpersName, Tyler ReddypersName, David CournapeaupersName, Evgeni BurovskipersName, Pearu PetersonpersName, Warren WeckesserpersName, Jonathan BrightpersName, Stéfan J. van der WaltpersName, Matthew BrettpersName, Joshua WilsonpersName, K. Jarrod MillmanpersName, Nikolay MayorovpersName, Andrew R. J. NelsonpersName, Eric JonespersName, Robert KernpersName, Eric LarsonpersName, C J CareypersName, İlhan PolatpersName, Yu FengpersName, Eric W. MoorepersName, Jake VanderPlaspersName, Denis LaxaldepersName, Josef PerktoldpersName, Robert CimrmanpersName, Ian HenriksenpersName, E. A. QuinteropersName, Charles R. HarrispersName, Anne M. ArchibaldpersName, Antônio H. RibeiropersName, Fabian PedregosapersName, Paul van MulbregtpersName, Aditya VijaykumarpersName, Alessandro Pietro BardellipersName, Alex RothbergpersName, Andreas HilbollpersName, Andreas KloecknerpersName, Anthony ScopatzpersName, Antony LeepersName, Ariel RokempersName, C. Nathan WoodspersName, Chad FultonpersName, Charles MassonpersName, Christian HäggströmpersName, Clark FitzgeraldpersName, David A. NicholsonpersName, David R. HagenpersName, Dmitrii V. PasechnikpersName, Emanuele OlivettipersName, Eric MartinpersName, Eric WieserpersName, Fabrice SilvapersName, Felix LenderspersName, Florian WilhelmpersName, G. YoungpersName, Gavin A. PricepersName, Gert-Ludwig IngoldpersName, Gregory E. AllenpersName, Gregory R. LeepersName, Hervé AudrenpersName, Irvin ProbstpersName, Jörg P. DietrichpersName, Jacob SilterrapersName, James T WebberpersName, Janko SlavičpersName, Joel NothmanpersName, Johannes BuchnerpersName, Johannes KulickpersName, Johannes L. SchönbergerpersName, José Vinícius de Miranda CardosopersName, Joscha ReimerpersName, Joseph HarringtonpersName, Juan Luis Cano RodríguezpersName, Juan Nunez-IglesiaspersName, Justin KuczynskipersName, Kevin TritzpersName, Martin ThomapersName, Matthew NewvillepersName, Matthias KümmererpersName, Maximilian BolingbrokepersName, Michael TartrepersName, Mikhail PakpersName, Nathaniel J. SmithpersName, Nikolai NowaczykpersName, Nikolay ShebanovpersName, Oleksandr PavlykpersName, Per A. BrodtkorbpersName, Perry LeepersName, Robert T. McGibbonpersName, Roman FeldbauerpersName, Sam LewispersName, Sam TygierpersName, Scott SievertpersName, Sebastiano VignapersName, Stefan PetersonpersName, Surhud MorepersName, Tadeusz PudlikpersName, Takuya OshimapersName, Thomas J. PingelpersName, Thomas P. RobitaillepersName, Thomas SpurapersName, Thouis R. JonespersName, Tim CerapersName, Tim LesliepersName, Tiziano ZitopersName, Tom KrausspersName, Utkarsh UpadhyaypersName, Yaroslav O. HalchenkopersName, Yoshiki Vázquez-BaezapersName (2020date). “SciPy 1.0: fundamental algorithms for scientific computing in Python.” Nature Methodstitle·j.

Object of study — SciPyterm 1.0 as scientific-computing software, technical architecture, development practice, and community infrastructure

Research question — what capabilities, implementation choices, recent improvements, quality practices, and governance make SciPyterm a foundational scientific-computing library

Contribution — an overview of SciPyterm 1.0 capabilities and development practices plus recent advances in sparseterm structures, compiled bindings, optimization, interpolation, testing, and benchmarking

Cross-disciplinary analysis
content-tags & facets: phenomenon · claim-type · cross-domain-transfer · mechanism · claim-relation · replication-status · limitation — grounded in the full text
phenomenonthe maturation, adoption, technical evolution, and maintenance of an open-source scientific software ecosystem — “Yet the philosophical motivations behind a fully open tool stack, combined with an excited, friendly community with a singular focus, have proven auspicious in the long run. They led not only to the library described in this paper, but also to an entire ecosystem of related packages ( https://wiki.python.org/moin/NumericAndScientific ) and a variety of social activities centered around them ( https://wiki.python.org/moin/PythonConferences ). The packages in the SciPy ecosystem share high standards of implementation, documentation and testing, and a culture eager to learn and adopt better practices—both for community management and software development.”
claim-typemethod — “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.”
method — evidence — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”
object of study — evidence — “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.”
research question — evidence — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”
contribution — evidence — “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.”
mechanismgeneral-purpose host language Adds scientific features to Python while retaining general data access and programming capabilities. — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”mechanisms[0]
mechanismscikit ecosystem Moves experimental packages outside the stable core while retaining shared development conventions. — “By the middle to late 2000s, SciPy was starting to mature after a long phase of significant growth and adoption. The scope of the SciPy library narrowed, while the breadth of the ecosystem grew through a new type of auxiliary package: the scikit ( https://www.scipy.org/scikits.html ), a complementary library developed outside SciPy, allowing for more rapid exploration of experimental ideas while maintaining familiar style and development methodology. In SciPy itself, tooling, development, documentation and release processes became more professional. The library was expanded carefully, with the patience affordable in open-source projects and via best practices, which are increasingly common in the scientific Python ecosystem and industry 30 .”mechanisms[1]
mechanismcompiled-library wrapping Exposes established Fortran and C routines through convenient Python interfaces. — “Fortran, despite its age, is still a high-performance scientific programming language with continued contemporary usage 50 . Thus, we wrap the following excellent, field-tested Fortran libraries to provide Python convenience while benefiting from their performance: QUADPACK 51 and ODEPACK 52 for numerical integration and solution of initial value problems; FITPACK 53 , ODRPACK 54 and MINPACK 55 for curve-fitting and least-squares minimization; FFTPACK 56 , 57 for performing Fourier transforms; ARPACK 58 for solving eigenvalue problems; ALGORITHM 644 (ref. 59 ) for computing Bessel functions; and CDFLIB 60 for evaluating cumulative density functions.”mechanisms[2]
mechanismCython glue Connects low-level C or C++ implementations to SciPy's Python interface. — “Cython has been described as a creole language that mixes the best parts of Python and lower-level C/C++ paradigms 40 . We often use Cython as a glue between well-established, low-level scientific computing libraries written in C/C++ and the Python interface offered by SciPy. We also use Cython to enable performance enhancements in Python code, especially for cases where heavily used inner loops benefit from a compiled code with static typing.”mechanisms[3]
mechanismdeprecation policy Preserves backward compatibility by warning users before removal or incompatible change. — “The API for SciPy consists of approximately 1,500 functions and classes. Our policy for evolving the API over time is that new functionality can be added, while removing or changing existing functionality can only be done if the benefits exceed the (often significant) costs to users and only after giving clear deprecation warnings to those users for at least one year. In general, we encourage changes that improve clarity in the API of the library but strongly discourage breaking backward compatibility, given our position near the base of the scientific Python computing stack.”mechanisms[4]
mechanismcompressed sparse formats Use CSR and CSC layouts for fast axis indexing and matrix-vector multiplication. — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”mechanisms[5]
mechanismC++ cKDTree reimplementation Releases the global interpreter lock and enables multiple query threads. — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”mechanisms[6]
mechanismdirect Cython calls Avoids the overhead of indirect calls through Python APIs. — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”mechanisms[7]
mechanismhomogeneous self-dual formulation Produces certificates identifying infeasible or unbounded linear programs. — “A new interior-point optimizer for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPy 1.0. Implementing the core algorithm of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulation provides certificates of infeasibility or unboundedness as appropriate.”mechanisms[8]
mechanismpresolve Tightens bounds, removes fixed variables, and eliminates redundant equality constraints before solving. — “A presolve routine 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparse matrix support and heavy use of SciPy’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.”mechanisms[9]
mechanismpopulation evolution Generates trial candidates from the current population and retains improvements. — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”mechanisms[10]
mechanismcontinuous-integration gate Temporarily merges proposed work, runs all tests, and requires success before permanent merge. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”mechanisms[11]
mechanismAirspeed Velocity Runs historical performance benchmarks so regressions and improvements can be tracked over time. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++.”mechanisms[12]
builds-on NumPy array structures and fast numerical routines — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[0]
supports higher-level scientific libraries — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[1]
contrasts-with specialized statistics, machine-learning, Bayesian, imaging, and graph packages — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”claim_relations[2]
qualifies compiled-code coverage as an underestimate of robustness — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity. Fig. 2 Python and compiled code volume in SciPy over time.”claim_relations[3]
extends SciPy with experimental multiple-backend FFT support — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”claim_relations[4]
senseSciPy as both a numerical-routine library and shared foundation for higher-level scientific software — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”senses[0]
senseversion 1.0 as a signal of production-ready API maturity rather than the project's beginning — “Recently, SciPy released version 1.0, a milestone that traditionally signals a library’s API (application programming interface) being mature enough to be trusted in production pipelines. This version numbering convention, however, belies the history of a project that has become the standard others follow and has seen extensive adoption in research and industry.”senses[1]
sensescientific Python as scientific features added to a general-purpose language — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”senses[2]
senseSciPy core scope as stable fundamentals complemented by specialized external packages — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”senses[3]
senseCython as maintainable glue between Python and lower-level compiled libraries — “Cython has been described as a creole language that mixes the best parts of Python and lower-level C/C++ paradigms 40 . We often use Cython as a glue between well-established, low-level scientific computing libraries written in C/C++ and the Python interface offered by SciPy. We also use Cython to enable performance enhancements in Python code, especially for cases where heavily used inner loops benefit from a compiled code with static typing.”senses[4]
sensesparse formats as alternative representations chosen for indexing, construction, or arithmetic behavior — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”senses[5]
sensetest suite as executable behavioral specification and regression protection — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”senses[6]
sensecontinuous integration as mandatory pre-merge testing of temporarily integrated contributions — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”senses[7]
sensebenchmarking as longitudinal measurement of code performance rather than correctness — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”senses[8]
sensemaintainers as volunteer reviewers and stewards who enable a larger contributor community — “The SciPy project has ~100 unique contributors for every 6-month release cycle. Anyone with the interest and skills can become a contributor; the SciPy contributor guide ( https://scipy.github.io/devdocs/dev/contributor/contributor_toc.html ) provides guidance on how to do that. In addition, the project currently has 15 active (volunteer) maintainers: people who review the contributions of others and do everything else needed to ensure that the software and the project move forward. Maintainers are critical to the health of the project 93 ; their skills and efforts largely determine how fast the project progresses, and they enable input from the much larger group of contributors. Anyone can become a maintainer, too, as they are selected on a rolling basis from contributors with a substantial history of high-quality contributions.”senses[9]
senseinstitutional memory as protection against repeated mistakes, inconsistent APIs, and scope drift — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”senses[10]
controlmultiple small executable tests for each component — rules out behavior regressions after code changes — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”controls[0]
controlcontinuous integration before permanent merge — held — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.” — rules out contributions that fail the test suite — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”controls[1]
controlcontinuous integration matrix across POSIX, Windows, and Python versions — rules out platform- or version-specific failures — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”controls[2]
controlAirspeed Velocity benchmark history — rules out undetected performance regressions over time — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++.”controls[3]
noteNumPy array structures and fast numerical routines — SciPy is explicitly described as built on top of NumPy. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[0]
weightNumPy array structures and fast numerical routines — 0.95 — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[0]
notehigher-level scientific libraries — The paper calls SciPy the foundation beneath scikit-learn and scikit-image. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[1]
weighthigher-level scientific libraries — 0.95 — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”claim_relations[1]
notespecialized statistics, machine-learning, Bayesian, imaging, and graph packages — The scope paragraph allocates advanced functionality to neighboring libraries. — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”claim_relations[2]
weightspecialized statistics, machine-learning, Bayesian, imaging, and graph packages — 0.95 — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”claim_relations[2]
evidence status notecompiled-code coverage as an underestimate of robustness — A FIGURE/TABLE CAPTION IS JOINED INTO THE 'evidence' QUOTE, beginning at character 1533: 'Fig. 2 Python and compiled code volume in SciPy over time.…'. The page prints the caption apart from the paragraph; read the quote as the paragraph, then the caption. — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity. Fig. 2 Python and compiled code volume in SciPy over time.”claim_relations[3]
notecompiled-code coverage as an underestimate of robustness — The authors explain why the raw compiled-code coverage percentage understates quality. — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity. Fig. 2 Python and compiled code volume in SciPy over time.”claim_relations[3]
weightcompiled-code coverage as an underestimate of robustness — 0.9 — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity. Fig. 2 Python and compiled code volume in SciPy over time.”claim_relations[3]
noteSciPy with experimental multiple-backend FFT support — The future-work paragraph reports a concrete experimental backend implementation. — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”claim_relations[4]
weightSciPy with experimental multiple-backend FFT support — 0.85 — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”claim_relations[4]
noteSciPy —is-a→ open-source scientific computing library — Direct categorical class statement. — “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.”concept_edges[0]
relationSciPy —is-a→ open-source scientific computing library — SciPy is an open-source scientific computing library. — “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.”concept_edges[0]
notesubpackages —part-of→ SciPy library — The library is categorically organized as a collection of subpackages. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[1]
relationsubpackages —part-of→ SciPy library — The subpackages compose the SciPy library. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[1]
notemathematical building blocks —part-of→ SciPy library — Direct categorical inclusion. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[2]
relationmathematical building blocks —part-of→ SciPy library — The SciPy library includes mathematical building blocks. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[2]
notedata structures —part-of→ SciPy library — Direct categorical inclusion. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[3]
relationdata structures —part-of→ SciPy library — The SciPy library includes data structures. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[3]
notealgorithms —part-of→ SciPy library — Direct categorical inclusion. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[4]
relationalgorithms —part-of→ SciPy library — The SciPy library includes algorithms. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[4]
notehigher-level data analysis functionality —part-of→ SciPy library — Direct categorical inclusion. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[5]
relationhigher-level data analysis functionality —part-of→ SciPy library — The SciPy library includes higher-level data analysis functionality. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concept_edges[5]
notesparse matrix data structures —same-as→ sparse formats — Explicit alternative naming. — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concept_edges[6]
relationsparse matrix data structures —same-as→ sparse formats — Sparse matrix data structures are also known as sparse formats. — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concept_edges[6]
notescipy.optimize.differential_evolution —is-a→ stochastic global optimizer — Direct categorical class statement. — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”concept_edges[7]
relationscipy.optimize.differential_evolution —is-a→ stochastic global optimizer — scipy.optimize.differential_evolution is a stochastic global optimizer. — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”concept_edges[7]
effect directiontest suite —causes→ confidence in the correctness and accuracy — increases — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.” — “increases confidence in the correctness and accuracy of the library”concept_edges[8]
notetest suite —causes→ confidence in the correctness and accuracy — Flat positive causal assertion; the sign is an increase. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concept_edges[8]
relationtest suite —causes→ confidence in the correctness and accuracy — The test suite increases confidence in correctness and accuracy. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concept_edges[8]
weighttest suite —causes→ confidence in the correctness and accuracy — 0.95 — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concept_edges[8]
effect directionreimplementing it in C++ —causes→ performance — increases — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.” — “we enhanced cKDTree.query by reimplementing it in C++”concept_edges[9]
notereimplementing it in C++ —causes→ performance — Positive improvement claim qualified by 'generally'. — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concept_edges[9]
relationreimplementing it in C++ —causes→ performance — Reimplementing cKDTree in C++ generally improved performance. — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concept_edges[9]
weightreimplementing it in C++ —causes→ performance — 0.9 — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concept_edges[9]
auditturnover —causes→ loss of institutional memory — Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but the span says too much turnover CAN result in loss of institutional memory; hedged. — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concept_edges[10]
noteturnover —causes→ loss of institutional memory — The modal 'can' and excessive-turnover condition make the positive relation to the loss outcome hedged. — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concept_edges[10]
relationturnover —causes→ loss of institutional memory — Too much turnover can result in loss of institutional memory. — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concept_edges[10]
weightturnover —causes→ loss of institutional memory — 0.65 — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concept_edges[10]
evidence status noteconcept — THE TERM IS NOT IN THE QUOTE - the term is the entry of SciPy's subpackage list that the quote describes (the entry label 'optimize' stands just before it). — “This subpackage includes simplex and interior-point linear programming solvers, implementations of many nonlinear minimization algorithms, a routine for least-squares curve fitting, and a collection of general nonlinear solvers for root-finding.”concepts[21]
evidence status noteconcept — A FIGURE/TABLE CAPTION IS JOINED INTO THE 'evidence' QUOTE, beginning at character 940: 'Fig. 3 Results of the scipy.spatial.cKDTree.query benchmark from the i…'. The page prints the caption apart from the paragraph; read the quote as the paragraph, then the caption. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”concepts[53]
outcomecontrol — held — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”controls[1]
evidence status notesense — A FIGURE/TABLE CAPTION IS JOINED INTO THE 'evidence' QUOTE, beginning at character 940: 'Fig. 3 Results of the scipy.spatial.cKDTree.query benchmark from the i…'. The page prints the caption apart from the paragraph; read the quote as the paragraph, then the caption. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”senses[8]
relationSciPy → NumPy — SciPy is built on top of NumPy. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”unhoused_relations[0]
relationhigher level scientific libraries → SciPy — Higher-level scientific libraries are built on the SciPy foundation. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”unhoused_relations[1]
relationscientific features → general-purpose programming language — Scientific features are added to a general-purpose language. — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”unhoused_relations[2]
relationspline curves → linear combinations of B-spline basis elements — The paper characterizes spline curves as linear combinations of B-spline basis elements. — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”unhoused_relations[3]
relationtest suite → collection — The collection of executable tests is known as a test suite. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”unhoused_relations[4]
relationscipy.LowLevelCallable → overhead — scipy.LowLevelCallable reduces compiled-call overhead. — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”unhoused_relations[5]
weightscipy.LowLevelCallable → overhead — 0.95 — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”unhoused_relations[5]
relationlow-level Cython interfaces → performance gains — Direct low-level Cython interfaces can give performance gains. — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”unhoused_relations[6]
weightlow-level Cython interfaces → performance gains — 0.65 — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”unhoused_relations[6]
relationpresolve routine → numerical difficulties — The presolve routine reduces the chance of numerical difficulties. — “A presolve routine 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparse matrix support and heavy use of SciPy’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.”unhoused_relations[7]
weightpresolve routine → numerical difficulties — 0.95 — “A presolve routine 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparse matrix support and heavy use of SciPy’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.”unhoused_relations[7]
relationcontinuous integration → test suite — Continuous integration requires all tests to pass before a contribution is permanently merged. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”unhoused_relations[8]
evidence status notebenchmark suite → performance — A FIGURE/TABLE CAPTION IS JOINED INTO THE 'evidence' QUOTE, beginning at character 940: 'Fig. 3 Results of the scipy.spatial.cKDTree.query benchmark from the i…'. The page prints the caption apart from the paragraph; read the quote as the paragraph, then the caption. The row's relation quote (the separate quote for the relation) repeats this quote word for word and carries the same caption at the same place. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”unhoused_relations[9]
relationbenchmark suite → performance — The benchmark suite tracks performance over time. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”unhoused_relations[9]
weightbenchmark suite → performance — 0.95 — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”unhoused_relations[9]
relationGPU and distributed computing → SciPy — GPU and distributed computing must be accommodated without disrupting SciPy's established API infrastructure. — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”unhoused_relations[10]
weightGPU and distributed computing → SciPy — 0.85 — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”unhoused_relations[10]
no type for thisSciPy → NumPy — SciPy is built on top of NumPy. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”unhoused_relations[0]
no type for thishigher level scientific libraries → SciPy — Higher-level scientific libraries are built on the SciPy foundation. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”unhoused_relations[1]
no type for thisscientific features → general-purpose programming language — Scientific features are added to a general-purpose language. — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”unhoused_relations[2]
no type for thisspline curves → linear combinations of B-spline basis elements — The paper characterizes spline curves as linear combinations of B-spline basis elements. — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”unhoused_relations[3]
no type for thistest suite → collection — The collection of executable tests is known as a test suite. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”unhoused_relations[4]
no type for thisscipy.LowLevelCallable → overhead — scipy.LowLevelCallable reduces compiled-call overhead. — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”unhoused_relations[5]
no type for thislow-level Cython interfaces → performance gains — Direct low-level Cython interfaces can give performance gains. — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”unhoused_relations[6]
no type for thispresolve routine → numerical difficulties — The presolve routine reduces the chance of numerical difficulties. — “A presolve routine 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparse matrix support and heavy use of SciPy’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.”unhoused_relations[7]
no type for thiscontinuous integration → test suite — Continuous integration requires all tests to pass before a contribution is permanently merged. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”unhoused_relations[8]
no type for thisbenchmark suite → performance — The benchmark suite tracks performance over time. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”unhoused_relations[9]
no type for thisGPU and distributed computing → SciPy — GPU and distributed computing must be accommodated without disrupting SciPy's established API infrastructure. — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”unhoused_relations[10]
limitationSciPy's core scope excludes advanced functionality better served by specialized packages. — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”limitations[0]
limitationDistributed computing and GPU support were outside the SciPy 1.0 scope. — “In terms of software systems and architecture, SciPy’s scope matches NumPy’s: algorithms for in-memory computing on single machines, with support for a wide range of data types and process architectures. Distributed computing and support for graphics processing units (GPUs) were explicitly out of scope at the 1.0 release point, but this has been revised in our roadmap (see Discussion).”limitations[1]
limitationAdopting new languages or dependencies is constrained by SciPy's foundational position and stability needs. — “The position that SciPy occupies near the foundation of the scientific Python ecosystem is such that adoption of new languages or major dependencies is generally unlikely; our choices are strongly driven by long-term stability. GPU acceleration, new transpiling libraries and the latest JIT compilation approaches (for example, Numba 66 ) are very powerful but have traditionally fallen outside the remit of the main SciPy library. That said, we have recently increased our efforts to support compatibility with some of these options, and our full test suite passed with the PyPy JIT compiler 67 at the 1.0 release point.”limitations[2]
limitationAPI changes impose significant downstream costs and therefore require long deprecation periods. — “The API for SciPy consists of approximately 1,500 functions and classes. Our policy for evolving the API over time is that new functionality can be added, while removing or changing existing functionality can only be done if the benefits exceed the (often significant) costs to users and only after giving clear deprecation warnings to those users for at least one year. In general, we encourage changes that improve clarity in the API of the library but strongly discourage breaking backward compatibility, given our position near the base of the scientific Python computing stack.”limitations[3]
limitationThe original SciPy-FITPACK interaction design constrained users and developers. — “Historically, SciPy relied heavily on the venerable FITPACK Fortran library by P. Dierckx 53 , 84 for univariate interpolation and approximation of data, but the original monolithic design and API for interaction between SciPy and FITPACK was limiting for both users and developers.”limitations[4]
limitationCompiled-code test coverage was low by the raw gcov measure and difficult to interpret. — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”limitations[5]
limitationProject funding was not commensurate with the software stack that depended on SciPy. — “The development cost of SciPy is estimated in excess of 10 million dollars by Open Hub ( https://www.openhub.net/p/scipy/estimated_cost ). Yet the project is largely unfunded, having been developed predominantly by graduate students, faculty and members of industry in their free time. Small amounts of funding have been applied with success: some meetings were sponsored by universities and industry, Google’s Summer of Code program supported infrastructure and algorithm work, and teaching grant funds were used early on to develop documentation. However, funding from national agencies, foundations and industry has not been commensurate with the enormous stack of important software that relies on SciPy. More diverse spending to support planning, development, management and infrastructure would help SciPy remain a healthy underpinning of international scientific and industrial endeavors.”limitations[6]
limitationDeveloper turnover can erase institutional memory and destabilize API and project scope. — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”limitations[7]
limitationThe project still needed more usage tutorials and modernization of low-level Cython code. — “Nevertheless, SciPy continually strives to improve. The SciPy Roadmap ( https://docs.scipy.org/doc/scipy-1.0.0/reference/roadmap.html , https://scipy.github.io/devdocs/roadmap.html ), summarized in Table 2 , is a continually updated document maintained by the community that describes some of the major directions for improvement for the project, as well as specific limitations and matters that require assistance moving forward. In addition to the items on the roadmap, we are still working to increase the number of SciPy usage tutorials beyond our current 15 section offering. Also, the low-level Cython code in our library (which interacts with C-level code and exposes it for Python usage) could use some measure of modernization, including migration to typed memoryviews to handle NumPy arrays.”limitations[8]
limitationThe route to GPU and distributed-computing support without API disruption remained unclear. — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”limitations[9]
Content tags
content-observations: finding · quantity · variable · definition · key-term — grounded in the full text
findingSciPy had become a de facto scientific-computing standard with extensive contributor and dependency networks. — “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.”content_tags.findings[0]
findingSciPy supplies numerical algorithms and specialized data structures while serving as a foundation for higher-level libraries. — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”content_tags.findings[1]
findingAdding scientific features to a general-purpose language expanded the problems, data sources, and developer community available to scientists. — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”content_tags.findings[2]
findingSide projects by graduate students grew into essential institutional research infrastructure. — “At this point, scientific Python started attracting more serious attention; code that started as side projects by graduate students had grown into essential infrastructure at national laboratories and research institutes. For example, Paul Dubois at Lawrence Livermore National Laboratory (LLNL) took over the maintenance of Numeric and funded the writing of its manual 26 , and the Space Telescope Science Institute (STScI), which was in charge of Hubble Space Telescope science operations, decided to replace their custom scripting language and analysis pipeline with Python 27 . As STScI continued to use Python for an increasingly large portion of the Hubble Space Telescope data analysis pipeline, they encountered problems with the Python numerical array container. Numeric, the original array package, was suitable for small arrays, but not for the large images processed by STScI. With the Numeric maintainer’s blessing, the decision was made to write NumArray 28 , a library that could handle data on a larger scale. Unfortunately, NumArray proved inefficient for small arrays, presenting the community with a rather unfortunate choice. In 2005, Travis Oliphant combined the best elements of Numeric and NumArray, thereby solving the dilemma. NumPy 1.0 was released 29 in October 2006, paving the way for the reunified scientific Python community to mature.”content_tags.findings[3]
findingExternal scikits allowed experimental work to move quickly while SciPy narrowed and stabilized its core scope. — “By the middle to late 2000s, SciPy was starting to mature after a long phase of significant growth and adoption. The scope of the SciPy library narrowed, while the breadth of the ecosystem grew through a new type of auxiliary package: the scikit ( https://www.scipy.org/scikits.html ), a complementary library developed outside SciPy, allowing for more rapid exploration of experimental ideas while maintaining familiar style and development methodology. In SciPy itself, tooling, development, documentation and release processes became more professional. The library was expanded carefully, with the patience affordable in open-source projects and via best practices, which are increasingly common in the scientific Python ecosystem and industry 30 .”content_tags.findings[4]
findingSciPy 1.0 contained sixteen subpackages spanning mathematical building blocks, data structures, algorithms, and data analysis. — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”content_tags.findings[5]
findingSciPy targets textbook-level fundamentals and leaves advanced statistical, machine-learning, Bayesian, imaging, and graph functions to specialized packages. — “SciPy provides fundamental algorithms for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPy aims to provide complete coverage. In other areas it aims to provide fundamental building blocks while interacting well with other packages specialized in that area. For example, SciPy provides what one expects to find in a statistics textbook (probability distributions, hypothesis tests, frequency statistics, correlation functions, and more), whereas Statsmodels 45 provides more advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPy’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparse.csgraph and spatial offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .”content_tags.findings[6]
findingThe project preferred maintainable higher-level implementations, using Cython before C, C++, or Fortran when Python was too slow. — “For implementing new functionality, Python is the still the language of choice. If Python performance is an issue, then we prefer the use of Cython followed by C, C++ or Fortran (in that order). The main motivation for this is maintainability: Cython has the highest abstraction level, and most Python developers will understand it. C is also widely known, and easier for the current core development team to manage than C++ and especially Fortran.”content_tags.findings[7]
findingBackward compatibility constrained API removal and required at least one year of deprecation warning. — “The API for SciPy consists of approximately 1,500 functions and classes. Our policy for evolving the API over time is that new functionality can be added, while removing or changing existing functionality can only be done if the benefits exceed the (often significant) costs to users and only after giving clear deprecation warnings to those users for at least one year. In general, we encourage changes that improve clarity in the API of the library but strongly discourage breaking backward compatibility, given our position near the base of the scientific Python computing stack.”content_tags.findings[8]
findingRewritten sparse-matrix internals made CSR and CSC iteration and slicing up to thirty-five percent faster. — “Over the last three years, our sparse matrix handling internals were rewritten and performance was improved. Iterating over and slicing of CSC and CSR matrices is now up to 35% faster, and the speed of coordinate (COO)/diagonal (DIA) to CSR/CSC matrix format conversions has increased. SuperLU 63 was updated to version 5.2.1, enhancing the low-level implementations leveraged by a subset of our sparse offerings.”content_tags.findings[9]
findingReimplementing cKDTree in C++ improved performance while preserving asymptotic complexity. — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”content_tags.findings[10]
findingDirect low-level Cython interfaces could improve performance by one or two orders of magnitude. — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”content_tags.findings[11]
findingThe SciPy 1.0 interior-point solver passed all tested NETLIB linear-program benchmarks and emitted infeasibility or unboundedness certificates. — “A new interior-point optimizer for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPy 1.0. Implementing the core algorithm of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulation provides certificates of infeasibility or unboundedness as appropriate.”content_tags.findings[12]
findingThe test suite and continuous-integration gate were used to protect correctness while code changed. — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”content_tags.findings[13]
findingTest coverage at SciPy 1.0 was much higher for Python than compiled code, though vendor and generated code complicated the compiled-code figure. — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”content_tags.findings[14]
findingBenchmarking documented substantial cKDTree query improvements over project history. — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++.”content_tags.findings[15]
findingThe project combined an established governance structure with volunteer maintainers and broad contribution pathways. — “SciPy adopted an official governance document ( https://docs.scipy.org/doc/scipy/reference/dev/governance/governance.html ) on August 3, 2017. A steering council, currently composed of 18 members, oversees daily development of the project by contributing code and reviewing contributions from the community. Council members have commit rights to the project repository, but they are expected to merge changes only when there are no substantive community objections. The chair of the steering council, Ralf Gommers, is responsible for initiating biannual technical reviews of project direction and summarizing any private council activities to the broader community. The project’s benevolent dictator for life, Pauli Virtanen, has overruling authority on any matter, but is expected to act in good faith and only exercise this authority when the steering council cannot reach agreement.”content_tags.findings[16]
findingDeveloper turnover threatened institutional memory, API consistency, and project scope. — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”content_tags.findings[17]
quantityover 600 — unique SciPy code contributors — “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.”content_tags.quantities[0]
quantityover 100,000 — dependent repositories reported in the 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.”content_tags.quantities[1]
quantitynearly 600,000 — lines of open-source SciPy code in February 2019 — “As of February 2019, the SciPy library consists of nearly 600,000 lines of open-source code organized in 16 subpackages summarized in Box 2 . The development team and community currently interact and operate primarily on GitHub, an online version control and task management platform. Over 110,000 GitHub repositories and 6,500 packages depend on SciPy 43 . Some of the major feature highlights from the three years preceding SciPy 1.0 are discussed in the “Key technical improvements” section below, and milestones in its history are highlighted in Fig. 1 .”content_tags.quantities[2]
quantity16 — subpackages in the SciPy library — “As of February 2019, the SciPy library consists of nearly 600,000 lines of open-source code organized in 16 subpackages summarized in Box 2 . The development team and community currently interact and operate primarily on GitHub, an online version control and task management platform. Over 110,000 GitHub repositories and 6,500 packages depend on SciPy 43 . Some of the major feature highlights from the three years preceding SciPy 1.0 are discussed in the “Key technical improvements” section below, and milestones in its history are highlighted in Fig. 1 .”content_tags.quantities[3]
quantity50% — approximate Python share of the SciPy codebase — “According to analysis using the linguist library ( https://github.com/github/linguist ), SciPy is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPy is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.”content_tags.quantities[4]
quantity25% — approximate Fortran share of the SciPy codebase — “According to analysis using the linguist library ( https://github.com/github/linguist ), SciPy is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPy is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.”content_tags.quantities[5]
quantity20% — approximate C share of the SciPy codebase — “According to analysis using the linguist library ( https://github.com/github/linguist ), SciPy is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPy is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.”content_tags.quantities[6]
quantity3% — approximate Cython share of the SciPy codebase — “According to analysis using the linguist library ( https://github.com/github/linguist ), SciPy is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPy is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.”content_tags.quantities[7]
quantity2% — approximate C++ share of the SciPy codebase — “According to analysis using the linguist library ( https://github.com/github/linguist ), SciPy is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPy is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.”content_tags.quantities[8]
quantityapproximately 1,500 — functions and classes in the SciPy API — “The API for SciPy consists of approximately 1,500 functions and classes. Our policy for evolving the API over time is that new functionality can be added, while removing or changing existing functionality can only be done if the benefits exceed the (often significant) costs to users and only after giving clear deprecation warnings to those users for at least one year. In general, we encourage changes that improve clarity in the API of the library but strongly discourage breaking backward compatibility, given our position near the base of the scientific Python computing stack.”content_tags.quantities[9]
quantityseven — sparse matrix data structures in scipy.sparse — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”content_tags.quantities[10]
quantityup to 35% — reported improvement in CSC and CSR iteration and slicing — “Over the last three years, our sparse matrix handling internals were rewritten and performance was improved. Iterating over and slicing of CSC and CSR matrices is now up to 35% faster, and the speed of coordinate (COO)/diagonal (DIA) to CSR/CSC matrix format conversions has increased. SuperLU 63 was updated to version 5.2.1, enhancing the low-level implementations leveraged by a subset of our sparse offerings.”content_tags.quantities[11]
quantityone or two orders of magnitude — potential performance gain from direct low-level Cython calls — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”content_tags.quantities[12]
quantity90+ — NETLIB linear-program benchmark problems solved by the new interior-point optimizer — “A new interior-point optimizer for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPy 1.0. Implementing the core algorithm of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulation provides certificates of infeasibility or unboundedness as appropriate.”content_tags.quantities[13]
quantity196 — global optimization benchmark problems in the SciPy suite — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”content_tags.quantities[14]
quantitymore than 100 — probability distributions in scipy.stats — “The scipy.stats subpackage contains more than 100 probability distributions: 96 continuous and 13 discrete univariate distributions, and 10 multivariate distributions. The implementation relies on a consistent framework that provides methods to sample random variates, to evaluate the cumulative distribution function (CDF) and the probability density function (PDF), and to fit parameters for every distribution. Generally, the methods rely on specific implementations for each distribution, such as a closed-form expression of the CDF or a sampling algorithm, if available. Otherwise, default methods are used based on generic code, for example, numerical integration of the PDF to obtain the CDF. Key recent distributions added to scipy.stats include the histogram-based distribution in scipy.stats.rv_histogram and the multinomial distribution in scipy.stats.multinomial (used, for example, in natural language processing 83 ).”content_tags.quantities[15]
quantitymore than 13,000 — unit tests in the test suite — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”content_tags.quantities[16]
quantity87% — Python-code test coverage at the SciPy 1.0 release — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”content_tags.quantities[17]
quantity45% — compiled-code coverage reported by gcov — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”content_tags.quantities[18]
quantity18 — members of the steering council — “SciPy adopted an official governance document ( https://docs.scipy.org/doc/scipy/reference/dev/governance/governance.html ) on August 3, 2017. A steering council, currently composed of 18 members, oversees daily development of the project by contributing code and reviewing contributions from the community. Council members have commit rights to the project repository, but they are expected to merge changes only when there are no substantive community objections. The chair of the steering council, Ralf Gommers, is responsible for initiating biannual technical reviews of project direction and summarizing any private council activities to the broader community. The project’s benevolent dictator for life, Pauli Virtanen, has overruling authority on any matter, but is expected to act in good faith and only exercise this authority when the steering council cannot reach agreement.”content_tags.quantities[19]
quantity15 — active volunteer maintainers — “The SciPy project has ~100 unique contributors for every 6-month release cycle. Anyone with the interest and skills can become a contributor; the SciPy contributor guide ( https://scipy.github.io/devdocs/dev/contributor/contributor_toc.html ) provides guidance on how to do that. In addition, the project currently has 15 active (volunteer) maintainers: people who review the contributions of others and do everything else needed to ensure that the software and the project move forward. Maintainers are critical to the health of the project 93 ; their skills and efforts largely determine how fast the project progresses, and they enable input from the much larger group of contributors. Anyone can become a maintainer, too, as they are selected on a rolling basis from contributors with a substantial history of high-quality contributions.”content_tags.quantities[20]
quantityin excess of 10 million dollars — estimated development cost — “The development cost of SciPy is estimated in excess of 10 million dollars by Open Hub ( https://www.openhub.net/p/scipy/estimated_cost ). Yet the project is largely unfunded, having been developed predominantly by graduate students, faculty and members of industry in their free time. Small amounts of funding have been applied with success: some meetings were sponsored by universities and industry, Google’s Summer of Code program supported infrastructure and algorithm work, and teaching grant funds were used early on to develop documentation. However, funding from national agencies, foundations and industry has not been commensurate with the enormous stack of important software that relies on SciPy. More diverse spending to support planning, development, management and infrastructure would help SciPy remain a healthy underpinning of international scientific and industrial endeavors.”content_tags.quantities[21]
quantity13,096,468 — 2017 PyPI downloads — “From the user side, there were 13,096,468 downloads of SciPy from the Python Packaging Index (PyPI) 95 and 5,776,017 via the default channel of the conda ( https://github.com/ContinuumIO/anaconda-package-data ) package manager during the year 2017. These numbers establish a lower bound on the total number of downloads by users given that PyPI and conda are only two of several popular methods for installing SciPy. The SciPy website ( http://www.scipy.org/ ), which has been the default citation in the absence of a peer-reviewed paper, has been cited over 3,000 times ( https://scholar.google.com/scholar?cites=2086009121748039507 ). Some of the most prominent uses of or demonstrations of credibility for SciPy include the LIGO-Virgo scientific collaboration that lead to the observation of gravitational waves 96 , the fact that SciPy is shipped directly with macOS and in the Intel distribution for Python 97 , and that SciPy is used by 47% of all machine learning projects on GitHub ( https://github.blog/2019-01-24-the-state-of-the-octoverse-machine-learning/ ).”content_tags.quantities[22]
quantity5,776,017 — 2017 downloads through the default conda channel — “From the user side, there were 13,096,468 downloads of SciPy from the Python Packaging Index (PyPI) 95 and 5,776,017 via the default channel of the conda ( https://github.com/ContinuumIO/anaconda-package-data ) package manager during the year 2017. These numbers establish a lower bound on the total number of downloads by users given that PyPI and conda are only two of several popular methods for installing SciPy. The SciPy website ( http://www.scipy.org/ ), which has been the default citation in the absence of a peer-reviewed paper, has been cited over 3,000 times ( https://scholar.google.com/scholar?cites=2086009121748039507 ). Some of the most prominent uses of or demonstrations of credibility for SciPy include the LIGO-Virgo scientific collaboration that lead to the observation of gravitational waves 96 , the fact that SciPy is shipped directly with macOS and in the Intel distribution for Python 97 , and that SciPy is used by 47% of all machine learning projects on GitHub ( https://github.blog/2019-01-24-the-state-of-the-octoverse-machine-learning/ ).”content_tags.quantities[23]
variabledata types (dimension of in-memory computing support) — “In terms of software systems and architecture, SciPy’s scope matches NumPy’s: algorithms for in-memory computing on single machines, with support for a wide range of data types and process architectures. Distributed computing and support for graphics processing units (GPUs) were explicitly out of scope at the 1.0 release point, but this has been revised in our roadmap (see Discussion).”content_tags.variables[1]
variableprocess architectures (dimension of machine-level compatibility) — “In terms of software systems and architecture, SciPy’s scope matches NumPy’s: algorithms for in-memory computing on single machines, with support for a wide range of data types and process architectures. Distributed computing and support for graphics processing units (GPUs) were explicitly out of scope at the 1.0 release point, but this has been revised in our roadmap (see Discussion).”content_tags.variables[2]
variablePython performance (trigger for selecting a lower-level implementation language) — “For implementing new functionality, Python is the still the language of choice. If Python performance is an issue, then we prefer the use of Cython followed by C, C++ or Fortran (in that order). The main motivation for this is maintainability: Cython has the highest abstraction level, and most Python developers will understand it. C is also widely known, and easier for the current core development team to manage than C++ and especially Fortran.”content_tags.variables[3]
variablemajor-axis indexing (sparse-format performance characteristic) — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”content_tags.variables[4]
variablematrix-vector multiplication (sparse-format performance characteristic) — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”content_tags.variables[5]
variableexecution time (outcome tracked by the benchmark suite) — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”content_tags.variables[6]
evidence status notevariable — A FIGURE/TABLE CAPTION IS JOINED INTO THE 'evidence' QUOTE, beginning at character 940: 'Fig. 3 Results of the scipy.spatial.cKDTree.query benchmark from the i…'. The page prints the caption apart from the paragraph; read the quote as the paragraph, then the caption.content_tags.variables[6]
variabletest coverage (fraction of code exercised by the test suite) — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”content_tags.variables[7]
definitionSciPy — “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.”content_tags.definitions[0]
definitionSciPy library — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”content_tags.definitions[1]
definitionsparse matrix data structures — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”content_tags.definitions[2]
definitioncKDTree — “The scipy.spatial.ckdtree module, which implements a space-partitioning data structure that organizes points in k -dimensional space, was rewritten in C++ with templated classes. Support was added for periodic boundary conditions, which are often used in simulations of physical processes.”content_tags.definitions[3]
definitionscipy.LowLevelCallable — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”content_tags.definitions[4]
definitionscipy.optimize.differential_evolution — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”content_tags.definitions[5]
definitionspline curves — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”content_tags.definitions[6]
definitiontest suite — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”content_tags.definitions[7]
definitioncontinuous integration — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”content_tags.definitions[8]
definitionmaintainers — “The SciPy project has ~100 unique contributors for every 6-month release cycle. Anyone with the interest and skills can become a contributor; the SciPy contributor guide ( https://scipy.github.io/devdocs/dev/contributor/contributor_toc.html ) provides guidance on how to do that. In addition, the project currently has 15 active (volunteer) maintainers: people who review the contributions of others and do everything else needed to ensure that the software and the project move forward. Maintainers are critical to the health of the project 93 ; their skills and efforts largely determine how fast the project progresses, and they enable input from the much larger group of contributors. Anyone can become a maintainer, too, as they are selected on a rolling basis from contributors with a substantial history of high-quality contributions.”content_tags.definitions[9]
Concepts
terms this paper carries, each with the sentence it was cut from — the layer that joins one paper to another. Terms with no quote yet are on CONCEPTS.html.
conceptSciPy — not defined in this paper's own words; open-source scientific-computing software library — “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.”concepts[0]
conceptopen-source scientific computing library — not defined in this paper's own words; software library for scientific algorithms in Python — “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.”concepts[1]
conceptPython programming language — not defined in this paper's own words; general-purpose host language for SciPy — “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.”concepts[2]
conceptscientific algorithms — not defined in this paper's own words; computational procedures supplied through SciPy — “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.”concepts[3]
conceptfundamental building blocks — not defined in this paper's own words; numerical routines used to model and solve scientific problems — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”concepts[4]
conceptNumPy — not defined in this paper's own words; array and numerical-routine foundation beneath SciPy — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”concepts[5]
concepthigher level scientific libraries — not defined in this paper's own words; software ecosystem built above SciPy — “SciPy is a library of numerical routines for the Python programming language that provides fundamental building blocks for modeling and solving scientific problems. SciPy includes algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structures, such as sparse matrices and k -dimensional trees. SciPy is built on top of NumPy 1 , 2 , which provides array data structures and related fast numerical routines, and SciPy is itself the foundation upon which higher level scientific libraries, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPy. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackages of SciPy, and the M87 black hole imaging project cites SciPy 9 .”concepts[6]
conceptapplication programming interface — not defined in this paper's own words; public contract through which users call SciPy — “Recently, SciPy released version 1.0, a milestone that traditionally signals a library’s API (application programming interface) being mature enough to be trusted in production pipelines. This version numbering convention, however, belies the history of a project that has become the standard others follow and has seen extensive adoption in research and industry.”concepts[7]
conceptSciPy ecosystem — not defined in this paper's own words; related scientific-Python packages and community activities — “Yet the philosophical motivations behind a fully open tool stack, combined with an excited, friendly community with a singular focus, have proven auspicious in the long run. They led not only to the library described in this paper, but also to an entire ecosystem of related packages ( https://wiki.python.org/moin/NumericAndScientific ) and a variety of social activities centered around them ( https://wiki.python.org/moin/PythonConferences ). The packages in the SciPy ecosystem share high standards of implementation, documentation and testing, and a culture eager to learn and adopt better practices—both for community management and software development.”concepts[8]
conceptgeneral-purpose programming language — not defined in this paper's own words; language extended with scientific capabilities — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”concepts[9]
conceptscientific features — not defined in this paper's own words; numerical and scientific capabilities added to Python — “This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific features are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.”concepts[10]
conceptessential infrastructure — not defined in this paper's own words; research-software foundation used by institutions — “At this point, scientific Python started attracting more serious attention; code that started as side projects by graduate students had grown into essential infrastructure at national laboratories and research institutes. For example, Paul Dubois at Lawrence Livermore National Laboratory (LLNL) took over the maintenance of Numeric and funded the writing of its manual 26 , and the Space Telescope Science Institute (STScI), which was in charge of Hubble Space Telescope science operations, decided to replace their custom scripting language and analysis pipeline with Python 27 . As STScI continued to use Python for an increasingly large portion of the Hubble Space Telescope data analysis pipeline, they encountered problems with the Python numerical array container. Numeric, the original array package, was suitable for small arrays, but not for the large images processed by STScI. With the Numeric maintainer’s blessing, the decision was made to write NumArray 28 , a library that could handle data on a larger scale. Unfortunately, NumArray proved inefficient for small arrays, presenting the community with a rather unfortunate choice. In 2005, Travis Oliphant combined the best elements of Numeric and NumArray, thereby solving the dilemma. NumPy 1.0 was released 29 in October 2006, paving the way for the reunified scientific Python community to mature.”concepts[11]
conceptscikit — not defined in this paper's own words; auxiliary package developed outside SciPy — “By the middle to late 2000s, SciPy was starting to mature after a long phase of significant growth and adoption. The scope of the SciPy library narrowed, while the breadth of the ecosystem grew through a new type of auxiliary package: the scikit ( https://www.scipy.org/scikits.html ), a complementary library developed outside SciPy, allowing for more rapid exploration of experimental ideas while maintaining familiar style and development methodology. In SciPy itself, tooling, development, documentation and release processes became more professional. The library was expanded carefully, with the patience affordable in open-source projects and via best practices, which are increasingly common in the scientific Python ecosystem and industry 30 .”concepts[12]
conceptSciPy library — not defined in this paper's own words; collection of sixteen scientific-computing subpackages — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[13]
conceptsubpackages — not defined in this paper's own words; functional modules composing the SciPy library — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[14]
conceptmathematical building blocks — not defined in this paper's own words; linear algebra, Fourier transform, and special-function modules — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[15]
conceptdata structures — sparse matrices and k -dimensional trees — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[16]
conceptalgorithms — not defined in this paper's own words; optimization, integration, clustering, interpolation, graph, and geometry procedures — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[17]
concepthigher-level data analysis functionality — not defined in this paper's own words; signal, image, and statistical analysis functions — “The SciPy library is organized as a collection of subpackages. The 16 subpackages include mathematical building blocks (for example, linear algebra, Fourier transforms, special functions), data structures (for example, sparse matrices, k -D trees), algorithms (for example, numerical optimization and integration, clustering, interpolation, graph algorithms, computational geometry) and higher-level data analysis functionality (for example, signal and image processing, statistical methods).”concepts[18]
conceptcluster subpackage — not defined in this paper's own words; clustering and vector-quantization module — “The cluster subpackage contains cluster.vq, which provides vector quantization and k -means algorithms, and cluster.hierarchy, which provides functions for hierarchical and agglomerative clustering.”concepts[19]
conceptintegrate subpackage — not defined in this paper's own words; numerical integration and differential-equation module — “The integrate subpackage provides tools for the numerical computation of single and multiple definite integrals and for the solution of ordinary differential equations, including initial value problems and two-point boundary value problems.”concepts[20]
conceptoptimize subpackage — not defined in this paper's own words; linear and nonlinear optimization module — “This subpackage includes simplex and interior-point linear programming solvers, implementations of many nonlinear minimization algorithms, a routine for least-squares curve fitting, and a collection of general nonlinear solvers for root-finding.”concepts[21]
conceptsignal subpackage — not defined in this paper's own words; signal-processing and linear-systems module — “The signal subpackage focuses on signal processing and basic linear systems theory. Functionality includes convolution and correlation, splines, filtering and filter design, continuous and discrete time linear systems, waveform generation, window functions, wavelet computations, peak finding and spectral analysis.”concepts[22]
conceptsparse — not defined in this paper's own words; sparse-matrix and sparse-graph module — “This subpackage includes implementations of several representations of sparse matrices. scipy.sparse.linalg provides a collection of linear algebra routines that work with sparse matrices, including linear equation solvers, eigenvalue decomposition, singular value decomposition and LU factorization. scipy.sparse.csgraph provides a collections of graph algorithms for which the graph is represented using a sparse matrix. Algorithms include connected components, shortest path, minimum spanning tree and more.”concepts[23]
conceptspatial — not defined in this paper's own words; spatial data structures, geometry, and distance module — “This subpackage provides spatial data structures and algorithms, including the k -d tree, Delaunay triangulation, convex hulls and Voronoi diagrams. scipy.spatial.distance provides a large collection of distance functions, along with functions for computing the distance between all pairs of vectors in a given collection of points or between all pairs from two collections of points.”concepts[24]
conceptstats subpackage — not defined in this paper's own words; probability distribution and statistical-analysis module — “The stats subpackage provides a large collection of continuous and discrete probability distributions, each with methods to compute the PDF or PMF, CDF, moments and other statistics, generation of random variates and more; statistical tests, including tests on equality of means/medians/variance (such as the t -test) and tests whether a sample is drawn from a certain distribution (such as the Kolmogorov-Smirnov test); measures of correlation, including Pearson’s r , Kendall’s τ , and Spearman’s ρ coefficients; descriptive statistics including trimmed values; kernel density estimation; and transformations of data such as the Box-Cox power transformation.”concepts[25]
conceptsparse matrix data structures — not defined in this paper's own words; seven sparse representations offered by scipy.sparse — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concepts[26]
conceptsparse formats — not defined in this paper's own words; alternative name for sparse matrix data structures — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concepts[27]
conceptCSR — not defined in this paper's own words; row-compressed sparse-matrix format — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concepts[28]
conceptCSC — not defined in this paper's own words; column-compressed sparse-matrix format — “scipy.sparse offers seven sparse matrix data structures, also known as sparse formats. The most important ones are the row- and column-compressed formats (CSR and CSC, respectively). These offer fast major-axis indexing and fast matrix-vector multiplication, and are used heavily throughout SciPy and dependent packages.”concepts[29]
conceptcKDTree — not defined in this paper's own words; k-dimensional space-partitioning implementation — “The scipy.spatial.ckdtree module, which implements a space-partitioning data structure that organizes points in k -dimensional space, was rewritten in C++ with templated classes. Support was added for periodic boundary conditions, which are often used in simulations of physical processes.”concepts[30]
conceptk -nearest-neighbor search — not defined in this paper's own words; nearest-neighbor query over a cKDTree — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concepts[31]
conceptreimplementing it in C++ — not defined in this paper's own words; cKDTree implementation change enabling multithreaded queries — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concepts[32]
conceptperformance — not defined in this paper's own words; execution efficiency of SciPy implementations — “In 2013, the time complexity of the k -nearest-neighbor search from cKDTree.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTree.query by reimplementing it in C++, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performance on any given problem while preserving the asymptotic complexity.”concepts[33]
conceptscipy.LowLevelCallable — not defined in this paper's own words; wrapper for compiled callback functions — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”concepts[34]
conceptoverhead — not defined in this paper's own words; cost of calling compiled functions through Python — “As of SciPy version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallable object that reduces the overhead of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallable.from_cython.”concepts[35]
conceptlow-level Cython interfaces — not defined in this paper's own words; direct bindings to wrapped numerical libraries — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”concepts[36]
conceptperformance gains — not defined in this paper's own words; speedup from direct low-level calls — “SciPy has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPy now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipy.special subpackage (added in 2016), which are available in scipy.linalg.cython_blas, scipy.linalg.cython_lapack and scipy.special.cython_special, respectively. When writing algorithms in Cython, it is typically more efficient to call directly into the libraries SciPy wraps rather than indirectly, using SciPy’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPy codebase to gain access to the functions in the wrapped libraries while avoiding the overhead of Python function calls. This can give performance gains of one or two orders of magnitude for many use cases.”concepts[37]
conceptinterior-point optimizer — not defined in this paper's own words; continuous linear-programming solver added in SciPy 1.0 — “A new interior-point optimizer for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPy 1.0. Implementing the core algorithm of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulation provides certificates of infeasibility or unboundedness as appropriate.”concepts[38]
concepthomogeneous self-dual formulation — not defined in this paper's own words; formulation providing infeasibility or unboundedness certificates — “A new interior-point optimizer for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPy 1.0. Implementing the core algorithm of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulation provides certificates of infeasibility or unboundedness as appropriate.”concepts[39]
conceptpresolve routine — not defined in this paper's own words; preprocessing that simplifies optimization problems — “A presolve routine 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparse matrix support and heavy use of SciPy’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.”concepts[40]
conceptminimize function — not defined in this paper's own words; unified interface to local nonlinear optimization methods — “The minimize function provides a unified interface for finding local minima of nonlinear optimization problems. Four new methods for unconstrained optimization were added to minimize in recent versions of SciPy: dogleg, trust-ncg, trust-exact and trust-krylov. All are trust-region methods that build a local model of the objective function based on first and second derivative information, approximate the best point within a local ‘trust region’ and iterate until a local minimum of the original objective function is reached, but each has unique characteristics that make it appropriate for certain types of problems. For instance, trust-exact achieves fast convergence by solving the trust-region subproblem almost exactly, but it requires the second derivative Hessian matrix to be stored and factored every iteration, which may preclude the solution of large problems (≥1,000 variables). In contrast, trust-ncg and trust-krylov are well suited to large-scale optimization problems because they do not need to store and factor the Hessian explicitly, instead using second derivative information in a faster, approximate way. We compare the characteristics of all minimize methods in detail in Table 1 , which illustrates the level of completeness that SciPy aims for when covering a numerical method or topic.”concepts[41]
conceptscipy.optimize.differential_evolution — not defined in this paper's own words; population-based global optimizer — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”concepts[42]
conceptstochastic global optimizer — not defined in this paper's own words; global optimization by candidate-population evolution — “As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolution function 81 , 82 is a stochastic global optimizer that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPy benchmark suite gained a comprehensive set of 196 global optimization problems for tracking the performance of existing solvers over time and for evaluating whether the performance of new solvers merits their inclusion in the package.”concepts[43]
conceptprobability distributions — not defined in this paper's own words; continuous, discrete, and multivariate statistical distributions — “The scipy.stats subpackage contains more than 100 probability distributions: 96 continuous and 13 discrete univariate distributions, and 10 multivariate distributions. The implementation relies on a consistent framework that provides methods to sample random variates, to evaluate the cumulative distribution function (CDF) and the probability density function (PDF), and to fit parameters for every distribution. Generally, the methods rely on specific implementations for each distribution, such as a closed-form expression of the CDF or a sampling algorithm, if available. Otherwise, default methods are used based on generic code, for example, numerical integration of the PDF to obtain the CDF. Key recent distributions added to scipy.stats include the histogram-based distribution in scipy.stats.rv_histogram and the multinomial distribution in scipy.stats.multinomial (used, for example, in natural language processing 83 ).”concepts[44]
conceptpiecewise polynomials — not defined in this paper's own words; polynomials represented interval by interval — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”concepts[45]
conceptspline curves — linear combinations of B-spline basis elements — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”concepts[46]
conceptlinear combinations of B-spline basis elements — not defined in this paper's own words; formal characterization of spline curves — “At the lowest level of the new design are classes that represent univariate piecewise polynomials: PPoly (SciPy 0.13) 85 , BPoly (SciPy 0.13) and BSpline (SciPy 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomials in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomials in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curves, that is, linear combinations of B-spline basis elements 87 .”concepts[47]
concepttest suite — not defined in this paper's own words; collection of executable behavior tests — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concepts[48]
conceptcollection — not defined in this paper's own words; multiple small executable tests taken together — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concepts[49]
conceptconfidence in the correctness and accuracy — not defined in this paper's own words; assurance produced by repeated executable checks — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concepts[50]
conceptcontinuous integration — not defined in this paper's own words; temporary integration and test gating of contributions — “Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPy, we write multiple small executable tests that verify its intended behavior. The collection of these, known as a ‘test suite’, increases confidence in the correctness and accuracy of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integration 92 , all proposed contributions to SciPy are temporarily integrated with the master branch of the library before the test suite is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPy covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.”concepts[51]
concepttest coverage — not defined in this paper's own words; share of implementation lines exercised by tests — “The SciPy test suite is orchestrated by a continuous integration matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are more than 13,000 unit tests in the test suite, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverage data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPy v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverage at the SciPy 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much more robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity.”concepts[52]
conceptbenchmark suite — not defined in this paper's own words; performance-regression monitoring with Airspeed Velocity — “In addition to ensuring that unit tests are passing, it is important to confirm that the performance of the SciPy codebase improves over time. Since February 2015, the performance of SciPy has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPy’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipy.spatial.cKDTree.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPy 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performance improvements were realized when cKDTree was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results 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.”concepts[53]
conceptsteering council — not defined in this paper's own words; eighteen-member SciPy governance body — “SciPy adopted an official governance document ( https://docs.scipy.org/doc/scipy/reference/dev/governance/governance.html ) on August 3, 2017. A steering council, currently composed of 18 members, oversees daily development of the project by contributing code and reviewing contributions from the community. Council members have commit rights to the project repository, but they are expected to merge changes only when there are no substantive community objections. The chair of the steering council, Ralf Gommers, is responsible for initiating biannual technical reviews of project direction and summarizing any private council activities to the broader community. The project’s benevolent dictator for life, Pauli Virtanen, has overruling authority on any matter, but is expected to act in good faith and only exercise this authority when the steering council cannot reach agreement.”concepts[54]
conceptmaintainers — not defined in this paper's own words; volunteers reviewing contributions and sustaining the project — “The SciPy project has ~100 unique contributors for every 6-month release cycle. Anyone with the interest and skills can become a contributor; the SciPy contributor guide ( https://scipy.github.io/devdocs/dev/contributor/contributor_toc.html ) provides guidance on how to do that. In addition, the project currently has 15 active (volunteer) maintainers: people who review the contributions of others and do everything else needed to ensure that the software and the project move forward. Maintainers are critical to the health of the project 93 ; their skills and efforts largely determine how fast the project progresses, and they enable input from the much larger group of contributors. Anyone can become a maintainer, too, as they are selected on a rolling basis from contributors with a substantial history of high-quality contributions.”concepts[55]
conceptinstitutional memory — not defined in this paper's own words; retained knowledge of past project decisions and mistakes — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concepts[56]
conceptloss of institutional memory — not defined in this paper's own words; project knowledge lost through excessive developer turnover — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concepts[57]
conceptturnover — not defined in this paper's own words; contributors leaving an open-source project — “A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnover can result in the loss of institutional memory, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPy project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for more than 10 years and is still actively contributing code, and the head of our steering council, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or more years. The combination of a committed old guard and a host of new contributors ensures that SciPy will continue to grow while maintaining a high level of quality.”concepts[58]
conceptGPU and distributed computing — not defined in this paper's own words; emerging computation backends not in the 1.0 scope — “A final important challenge to address is the accommodation of GPU and distributed computing without disrupting our conventional and heavily used algorithm/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackage that allows for the experimental use of multiple backends, such as GPU-tractable data structures, in the new scipy.fft. This will be described in detail in a future report.”concepts[59]

Full text — tagged

The reference list is not part of the text we hold for this paper. Our copy was extracted from the publisher's page and the bibliography did not survive that extraction, so the article below ends before its references. Nothing has been removed by us.

SciPyterm 1.0: fundamental algorithmsterm·mth for scientific computing in Python Abstract SciPyterm is an open-source scientific computing libraryterm·mth for the Python programming languageterm·mth. Since its initial release in 2001, SciPyterm has become a de facto standard for leveraging scientific algorithmsterm·mth 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 SciPyterm 1.0 and highlight some recent technical developments.

Main SciPyterm is a library of numerical routines for the Python programming languageterm·mth that provides fundamental building blocksterm·mth for modeling and solving scientific problems. SciPyterm includes algorithmsterm·mth for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations and many other classes of problems; it also provides specialized data structuresterm, such as sparseterm matrices and k -dimensional trees. SciPyterm is built on top of NumPyterm 1 , 2 , which provides array data structuresterm and related fast numerical routines, and SciPyterm is itself the foundation upon which higher level scientific librariesterm, including scikit-learn 3 and scikit-image 4 , are built. Scientists, engineers and others around the world rely on SciPyterm. For example, published scripts 5 , 6 used in the analysis of gravitational waves 7 , 8 import several subpackagesterm of SciPyterm, and the M87 black hole imaging project cites SciPyterm 9 .

Recently, SciPyterm released version 1.0, a milestone that traditionally signals a library’s API (application programming interfaceterm·mth) being mature enough to be trusted in production pipelines. This version numbering convention, however, belies the history of a project that has become the standard others follow and has seen extensive adoption in research and industry.

SciPyterm’s arrival at this point is surprising and somewhat anomalous. When started in 2001, the library had little funding and was written mainly by graduate students—many of them without a computer science education and often without the blessing of their advisors. To even imagine that a small group of ‘rogue’ student programmers could upend the already well-established ecosystem of research software—backed by millions in funding and many hundreds of highly qualified engineers 10 – 12 —was preposterous.

Yet the philosophical motivations behind a fully open tool stack, combined with an excited, friendly community with a singular focus, have proven auspicious in the long run. They led not only to the library described in this paper, but also to an entire ecosystem of related packages ( https://wiki.python.org/moin/NumericAndScientific ) and a variety of social activities centered around them ( https://wiki.python.org/moin/PythonConferences ). The packages in the SciPy ecosystemterm share high standards of implementation, documentation and testing, and a culture eager to learn and adopt better practices—both for community management and software development.

Background Here we capture a selective history of some milestones and important events in the growth of SciPyterm. Despite what we highlight here, it is important to understand that a project like SciPyterm is only possible because of the contributions of very many contributors—too many to mention individually, but each bringing an important piece to the puzzle.

Python is an interpreted, high-level, general-purpose computer programming language, designed by Guido van Rossum in the late 1980s, with a dynamic type system and an emphasis on readability and rapid prototyping 13 ( https://github.com/python/cpython ). As a general-purpose programming languageterm·mth, it had no special support for scientific data structuresterm or algorithmsterm·mth, unlike many of the other established computation platforms of the time. Yet scientists soon discovered the language’s virtues, such as its ability to wrap C and Fortran libraries, and to then drive those libraries interactively. Scientists could thereby gain access to a wide variety of existing computational libraries without concerning themselves with low-level programming concepts such as memory management.

In 1995, Jim Hugunin, a graduate student at the Massachusetts Institute of Technology, wrote the first message in a new Python Matrix Special Interest Group (Matrix-SIG) mailing list 14 : “There seems to be a fair amount of interest in the Python community concerning the addition of numeric operations to Python. My own desire is to have as large a library of matrix based functions available as possible (linear algebra, eigenfunctions, signal processing, statistics, etc.). In order to ensure that all of these libraries interoperate, there needs to be agreement on a basic matrix object that can be used to represent arrays of numbers.”

Over the next several months, conversations on that mailing list by, among others, Jim FultonpersName, Jim Hugunin, Paul Dubois, Konrad Hinsen and Guido van Rossum led to the creation of a package called Numeric with an array object that supported a high number of dimensions. Jim Hugunin explained the utility of Python for numerical computation 15 : “I’ve used almost all of the available numerical languages at one time or another over the past 8 years. One thing I’ve noticed is that over time, the designers of these languages are steadily adding morepersName of the features that one would expect to find in a general-purpose programming languageterm·mth.”

This remains a distinguishing feature of Python for science and one of the reasons why it has been so successful in the realm of data science: instead of adding general features to a language designed for numerical and scientific computing, here scientific featuresterm·mth are added to a general-purpose language. This broadens the scope of problems that can be addressed easily, expands the sources of data that are readily accessible and increases the size of the community that develops code for the platform.

SciPyterm begins By the late 1990s, discussions appeared on Matrix-SIG expressing a desire for a complete scientific data analysis environment 16 . Travis OliphantpersName, a PhD student at the Mayo Clinic, released a number of packages 17 , 18 that built on top of the Numeric array package, and provided algorithmsterm·mth for signal processing, special functions, sparseterm matrices, quadrature, optimization, fast Fourier transforms and morepersName. One of these packages, Multipack ( http://pylab.sourceforge.net/multipack.html ), was a set of extension modules that wrapped Fortran and C libraries to solve nonlinear equations and least-squares problems, integrate differential equations and fit splines. Robert KernpersName, then an undergraduate student (and currently a SciPyterm core developer), provided compilation instructions under Windows. Around the same time, Pearu PetersonpersName, a PhD student from Estonia, released F2PY 19 , a command line tool for binding Python and Fortran codes, and wrote modules for linear algebra and interpolation. Eric JonespersName, while a graduate student at Duke University, wrote packages to support his dissertation, including a parallel job scheduler and genetic optimizer. Gary Strangman, a postdoctoral fellow at Harvard Medical School, published several descriptive and inferential statistical routines 20 .

With a rich programming environment and a numerical array object in place, the time was ripe for the development of a full scientific software stack. In 2001, Eric JonespersName and Travis Vaught founded Enthought Scientific Computing Solutions (now Enthought, Inc.) in Austin, Texas, USA. To simplify the tool stack, they created the SciPyterm project, centered around the SciPy libraryterm, which would subsume all the above-mentioned packages. The new project quickly gained momentum, with a website and code repository 21 appearing in February, and a mailing list announced 22 in June 2001. By August 2001, a first release was announced 23 , an excerpt of which is shown in Box 1 . In September, the first documentation was published 24 . The first SciPyterm workshop 25 was held in September 2002 at Caltech—a single track, two-day event with 50 participants, many of them developers of SciPyterm and surrounding libraries.

At this point, scientific Python started attracting morepersName serious attention; code that started as side projects by graduate students had grown into essential infrastructureterm at national laboratories and research institutes. For example, Paul Dubois at Lawrence Livermore National Laboratory (LLNL) took over the maintenance of Numeric and funded the writing of its manual 26 , and the Space Telescope Science Institute (STScI), which was in charge of Hubble Space Telescope science operations, decided to replace their custom scripting language and analysis pipeline with Python 27 . As STScI continued to use Python for an increasingly large portion of the Hubble Space Telescope data analysis pipeline, they encountered problems with the Python numerical array container. Numeric, the original array package, was suitable for small arrays, but not for the large images processed by STScI. With the Numeric maintainerterm’s blessing, the decision was made to write NumArray 28 , a library that could handle data on a larger scale. Unfortunately, NumArray proved inefficient for small arrays, presenting the community with a rather unfortunate choice. In 2005, Travis OliphantpersName combined the best elements of Numeric and NumArray, thereby solving the dilemma. NumPyterm 1.0 was released 29 in October 2006, paving the way for the reunified scientific Python community to mature.

SciPyterm matures By the middle to late 2000s, SciPyterm was starting to mature after a long phase of significant growth and adoption. The scope of the SciPy libraryterm narrowed, while the breadth of the ecosystem grew through a new type of auxiliary package: the scikitterm·mth ( https://www.scipyterm.org/scikitsterm·mth.html ), a complementary library developed outside SciPyterm, allowing for morepersName rapid exploration of experimental ideas while maintaining familiar style and development methodology. In SciPyterm itself, tooling, development, documentation and release processes became morepersName professional. The library was expanded carefully, with the patience affordable in open-source projects and via best practices, which are increasingly common in the scientific Python ecosystem and industry 30 .

Early versions of SciPyterm had minimal documentation, but this began to change with the 2006 release of a Guide to NumPyterm 1 . In 2007, Sphinx 31 made it possible to render hypertext and PDF documents automatically from plain text (docstrings) interspersed with Python code, and in 2008, pydocweb 32 enabled collaborative documentation development in a wiki-like fashion. The SciPyterm Documentation Project 33 , 34 used these tools to complete documentation of SciPyterm’s user-facing functionality: offering t-shirts to contributors from around the world in exchange for high-quality text, it collected contributions from over 75 people to produce an 884-page manual 35 . Since then, SciPyterm has remained committed to maintaining high-quality documentation as part of the normal development cycle.

In the early SciPyterm workshops, recurrent topics reflected the state of development, with emphasis being placed on the underlying array package, plotting, parallel processing, acceleration/wrapping and user interfaces. By 2004, presentations about the application of SciPyterm to scientific problems began to appear. The event also started to draw in morepersName keynote speakers from outside the community, such as Guido van Rossum (creator of Python, 2006), Ivan Krstić (One Laptop per Child, 2007), Alex Martelli (Google, 2008) and Peter Norvig (Google Research, 2009). The informal workshop grew from a small gathering of core developers into an international conference with hundreds of attendees, increased funding, a published proceedings and scholarships for attending students. By 2010, the US SciPyterm conference had multiple tracks, and satellite conferences were being organized by volunteers elsewhere, such as EuroSciPy (since 2008) and SciPyterm India (since 2009). Special sessions and minisymposia dedicated to scientific Python began appearing at many other events. For example, a three-part minisymposium organized for International Conferences on Computational Science and Engineering (CSE) 2009 was featured in SIAM News 36 .

In 2007, Python had a strong enough presence in science and engineering that the editors of IEEE Computing in Science and Engineering solicited a special issue about Python in science 37 , edited by Paul Dubois. However, Python was still sufficiently niche that the average reader would need additional information to decide whether it would be useful in their own work. The follow-up March/April 2011 Python for Scientists and Engineers special issue 38 focused morepersName on the core parts of the scientific Python ecosystem 39 including NumPyterm 2 , Cython 40 and Mayavi 41 . Python became so pervasive that journals began publishing domain-specific special issues. For example, in 2015, Frontiers in Neuroinformatics published a collectionterm of 25 articles—covering topics including modeling and simulation, data collectionterm, electrophysiology, visualization as well as stimulus generation and presentation—called Python in Neuroscience 42 .

SciPyterm today As of February 2019, the SciPy libraryterm consists of nearly 600,000 lines of open-source code organized in 16 subpackagesterm summarized in Box 2 . The development team and community currently interact and operate primarily on GitHub, an online version control and task management platform. Over 110,000 GitHub repositories and 6,500 packages depend on SciPyterm 43 . Some of the major feature highlights from the three years preceding SciPyterm 1.0 are discussed in the “Key technical improvements” section below, and milestones in its history are highlighted in Fig. 1 . Fig. 1 Major milestones from SciPyterm’s initial release in 2001 to the release of SciPyterm 1.0 in 2017. Note that SciKitsterm·mth and GitHub have been introduced in the Background section; morepersName information about Cython and SciPyterm subpackagesterm (for example, scipyterm.sparseterm) is available in the ‘Architecture and implementation choices’ section, BLAS/LAPACK support is detailed in the ‘Key technical improvements’ section, and continuous integrationterm is discussed in the ‘Test and benchmark suiteterm’ section.

SciPyterm is an open-source package that builds on the strengths of Python and Numeric, providing a wide range of fast scientific and numeric functionality. SciPyterm’s current module set includes the following: Special functions (Bessel, Hankel, Airy and others) Signal/image processing 2D plotting capabilities Integration ODE solvers Optimization (simplex, BFGS, Newton-CG and others) Genetic algorithmsterm·mth Numeric to C++ expression compiler Parallel programming tools Splines and interpolation Other items The SciPy libraryterm is organized as a collectionterm of subpackagesterm. The 16 subpackagesterm include mathematical building blocksterm (for example, linear algebra, Fourier transforms, special functions), data structuresterm (for example, sparseterm matrices, k -D trees), algorithmsterm·mth (for example, numerical optimization and integration, clustering, interpolation, graph algorithmsterm·mth, computational geometry) and higher-level data analysis functionalityterm·mth (for example, signal and image processing, statistical methods).

Here we summarize the scope and capabilities of each subpackageterm. Additional information is available in the SciPyterm tutorial ( https://docs.scipyterm.org/doc/scipyterm/reference/tutorial/ ) and API reference ( https://docs.scipyterm.org/doc/scipyterm/reference/index.html#api-reference ).

cluster The cluster subpackageterm contains cluster.vq, which provides vector quantization and k -means algorithmsterm·mth, and cluster.hierarchy, which provides functions for hierarchical and agglomerative clustering.

constants Physical and mathematical constants, including the CODATA recommended values of the fundamental physical constants 119 .

fftpack Fast Fourier Transform routines. In addition to the FFT itself, the subpackageterm includes functions for the discrete sine and cosine transforms and for pseudo-differential operators.

integrate The integrate subpackageterm provides tools for the numerical computation of single and multiple definite integrals and for the solution of ordinary differential equations, including initial value problems and two-point boundary value problems.

interpolate The interpolate subpackageterm contains spline functions and classes, one-dimensional and multi-dimensional (univariate and multivariate) interpolation classes, Lagrange and Taylor polynomial interpolators, and wrappers for FITPACK 53 and DFITPACK functions.

A collectionterm of functions and classes for reading and writing Matlab ( https://www.mathworks.com/products/matlab.html ), IDL, Matrix Market 120 , Fortran, NetCDF 121 , Harwell-Boeing 122 , WAV and ARFF data files.

linalg Linear algebra functions, including elementary functions of a matrix, such as the trace, determinant, norm and condition number; basic solver for Ax = b ; specialized solvers for Toeplitz matrices, circulant matrices, triangular matrices and other structured matrices; least-squares solver and pseudo-inverse calculations; eigenvalue and eigenvector calculations (basic and generalized); matrix decompositions, including Cholesky, Schur, Hessenberg, LU , LDL T , QR , QZ , singular value and polar; and functions to create specialized matrices, such as diagonal, Toeplitz, Hankel, companion, Hilbert and morepersName.

ndimage This subpackageterm contains various functions for multi-dimensional image processing, including convolution and assorted linear and nonlinear filters (Gaussian filter, median filter, Sobel filter and others); interpolation; region labeling and processing; and mathematical morphology functions.

misc A collectionterm of functions that did not fit into the other subpackagesterm. Although this subpackageterm still exists in SciPyterm 1.0, an effort is underway to deprecate or relocate the contents of this subpackageterm and remove it.

odr Orthogonal distance regression, including Python wrappers for the Fortran library ODRPACK 54 .

optimize This subpackageterm includes simplex and interior-point linear programming solvers, implementations of many nonlinear minimization algorithmsterm·mth, a routine for least-squares curve fitting, and a collectionterm of general nonlinear solvers for root-finding.

signal The signal subpackageterm focuses on signal processing and basic linear systems theory. Functionality includes convolution and correlation, splines, filtering and filter design, continuous and discrete time linear systems, waveform generation, window functions, wavelet computations, peak finding and spectral analysis.

sparseterm This subpackageterm includes implementations of several representations of sparseterm matrices. scipyterm.sparseterm.linalg provides a collectionterm of linear algebra routines that work with sparseterm matrices, including linear equation solvers, eigenvalue decomposition, singular value decomposition and LU factorization. scipyterm.sparseterm.csgraph provides a collectionsterm of graph algorithmsterm·mth for which the graph is represented using a sparseterm matrix. Algorithmsterm·mth include connected components, shortest path, minimum spanning tree and morepersName.

spatialterm This subpackageterm provides spatialterm data structuresterm and algorithmsterm·mth, including the k -d tree, Delaunay triangulation, convex hulls and Voronoi diagrams. scipyterm.spatialterm.distance provides a large collectionterm of distance functions, along with functions for computing the distance between all pairs of vectors in a given collectionterm of points or between all pairs from two collectionsterm of points.

special The name comes from the class of functions traditionally known as special functions, but over time, the subpackageterm has grown to include functions beyond the classical special functions. A morepersName appropriate characterization of this subpackageterm is simply useful functions. It includes a large collectionterm of the classical special functions such as Airy, Bessel and others; families of orthogonal polynomials; the Gamma function, and functions related to it; functions for computing the PDF, CDF and quantile function for several probability distributionsterm; information theory functions; combinatorial functions comb and factorial; and morepersName.

stats The stats subpackageterm provides a large collectionterm of continuous and discrete probability distributionsterm, each with methods to compute the PDF or PMF, CDF, moments and other statistics, generation of random variates and morepersName; statistical tests, including tests on equality of means/medians/variance (such as the t -test) and tests whether a sample is drawn from a certain distribution (such as the Kolmogorov-Smirnov test); measures of correlation, including Pearson’s r , Kendall’s τ , and Spearman’s ρ coefficients; descriptive statistics including trimmed values; kernel density estimation; and transformations of data such as the Box-Cox power transformation.

Architecture and implementation choices Project scope SciPyterm provides fundamental algorithmsterm·mth for scientific computing. The breadth of its scope was derived from the guide to available mathematical software (GAMS) classification system 44 . In areas that move relatively slowly, for example, linear algebra, SciPyterm aims to provide complete coverage. In other areas it aims to provide fundamental building blocksterm·mth while interacting well with other packages specialized in that area. For example, SciPyterm provides what one expects to find in a statistics textbook (probability distributionsterm, hypothesis tests, frequency statistics, correlation functions, and morepersName), whereas Statsmodels 45 provides morepersName advanced statistical estimators and inference methods, scikit-learn 3 covers machine learning, and PyMC3 46 , emcee 47 and PyStan ( http://mc-stan.org ) cover Bayesian statistics and probabilistic modeling. scikit-image 4 provides image processing capabilities beyond SciPyterm’s ndimage, SymPy 48 provides a Python interface for symbolic computation, and sparseterm.csgraph and spatialterm offer basic tools for working with graphs and networks compared to specialized libraries such as NetworkX 49 .

We use the following criteria to determine whether to include new functionality in SciPyterm: The algorithmterm·mth is of relevance to multiple fields of science. The algorithmterm·mth is demonstrably important. For example, it is classic enough to be included in textbooks, or it is based on a peer-reviewed article that has a substantial number of citations.

In terms of software systems and architecture, SciPyterm’s scope matches NumPyterm’s: algorithmsterm·mth for in-memory computing on single machines, with support for a wide range of data typesterm·var and process architecturesterm·var. Distributed computing and support for graphics processing units (GPUs) were explicitly out of scope at the 1.0 release point, but this has been revised in our roadmap (see Discussion).

Language choices According to analysis using the linguist library ( https://github.com/github/linguist ), SciPyterm is approximately 50% Python, 25% Fortran, 20% C, 3% Cython and 2% C++, with a dash of TeX, Matlab, shell script and Make. The distribution of secondary programming languages in SciPyterm is a compromise between a powerful, performance-enhancing language that interacts well with Python (that is, Cython) and the usage of languages (and their libraries) that have proven reliable and performant over many decades.

Fortran, despite its age, is still a high-performance scientific programming language with continued contemporary usage 50 . Thus, we wrap the following excellent, field-tested Fortran libraries to provide Python convenience while benefiting from their performanceterm: QUADPACK 51 and ODEPACK 52 for numerical integration and solution of initial value problems; FITPACK 53 , ODRPACK 54 and MINPACK 55 for curve-fitting and least-squares minimization; FFTPACK 56 , 57 for performing Fourier transforms; ARPACK 58 for solving eigenvalue problems; ALGORITHMterm·mth 644 (ref. 59 ) for computing Bessel functions; and CDFLIB 60 for evaluating cumulative density functions.

Rounding out the top three languages in SciPyterm is C, which is also extremely well-established over several decades 61 of scientific computing. The C libraries that we wrap in SciPyterm include trlib 62 for optimization, SuperLU 63 , 64 for solving sparseterm linear systems, Qhull 65 for computational geometry and Cephes ( http://www.netlib.org/cephes/ ) for special functions.

Cython has been described as a creole language that mixes the best parts of Python and lower-level C/C++ paradigms 40 . We often use Cython as a glue between well-established, low-level scientific computing libraries written in C/C++ and the Python interface offered by SciPyterm. We also use Cython to enable performanceterm enhancements in Python code, especially for cases where heavily used inner loops benefit from a compiled code with static typing.

For implementing new functionality, Python is the still the language of choice. If Python performanceterm·var is an issue, then we prefer the use of Cython followed by C, C++ or Fortran (in that order). The main motivation for this is maintainability: Cython has the highest abstraction level, and most Python developers will understand it. C is also widely known, and easier for the current core development team to manage than C++ and especially Fortran.

The position that SciPyterm occupies near the foundation of the scientific Python ecosystem is such that adoption of new languages or major dependencies is generally unlikely; our choices are strongly driven by long-term stability. GPU acceleration, new transpiling libraries and the latest JIT compilation approaches (for example, Numba 66 ) are very powerful but have traditionally fallen outside the remit of the main SciPy libraryterm. That said, we have recently increased our efforts to support compatibility with some of these options, and our full test suiteterm·mth passed with the PyPy JIT compiler 67 at the 1.0 release point.

API and ABI evolution The API for SciPyterm consists of approximately 1,500 functions and classes. Our policy for evolving the API over time is that new functionality can be added, while removing or changing existing functionality can only be done if the benefits exceed the (often significant) costs to users and only after giving clear deprecation warnings to those users for at least one year. In general, we encourage changes that improve clarity in the API of the library but strongly discourage breaking backward compatibility, given our position near the base of the scientific Python computing stack.

In addition to the Python API, SciPyterm has C and Cython interfaces. Therefore, we also have to consider the application binary interface (ABI). This ABI has been stable for a long time, and we aim to evolve it only in a backward-compatible way.

Key technical improvements Here we describe key technical improvements made in the last three years.

Data structuresterm Sparseterm matrices scipyterm.sparseterm offers seven sparse matrix data structuresterm, also known as sparse formatsterm. The most important ones are the row- and column-compressed formats (CSRterm and CSCterm, respectively). These offer fast major-axis indexingterm·var and fast matrix-vector multiplicationterm·var, and are used heavily throughout SciPyterm and dependent packages.

Over the last three years, our sparseterm matrix handling internals were rewritten and performanceterm was improved. Iterating over and slicing of CSCterm and CSRterm matrices is now up to 35% faster, and the speed of coordinate (COO)/diagonal (DIA) to CSRterm/CSCterm matrix format conversions has increased. SuperLU 63 was updated to version 5.2.1, enhancing the low-level implementations leveraged by a subset of our sparseterm offerings.

From a new features standpoint, scipyterm.sparseterm matrices and linear operators now support the Python matrix multiplication (@) operator. We added scipyterm.sparseterm.norm and scipyterm.sparseterm.random for computing sparseterm matrix norms and drawing random variates from arbitrary distributions, respectively. Also, we made a concerted effort to bring the scipyterm.sparseterm API into line with the equivalent NumPyterm API where possible.

cKDTreeterm·mth The scipyterm.spatialterm.ckdtreeterm·mth module, which implements a space-partitioning data structureterm that organizes points in k -dimensional space, was rewritten in C++ with templated classes. Support was added for periodic boundary conditions, which are often used in simulations of physical processes.

In 2013, the time complexity of the k -nearest-neighbor searchterm from cKDTreeterm·mth.query was approximately loglinear 68 , consistent with its formal description 69 . Since then, we enhanced cKDTreeterm·mth.query by reimplementing it in C++term, removing memory leaks and allowing release of the global interpreter lock (GIL) so that multiple threads may be used 70 . This generally improved performanceterm on any given problem while preserving the asymptotic complexity.

In 2015, SciPyterm added the sparseterm_distance_matrix routine for generating approximate sparseterm distance matrices between KDTree objects by ignoring all distances that exceed a user-provided value. This routine is not limited to the conventional L2 (Euclidean) norm but supports any Minkowski p -norm between 1 and infinity. By default, the returned data structureterm is a dictionary of keys (DOK)-based sparseterm matrix, which is very efficient for matrix construction. This hashing approach to sparseterm matrix assembly can be seven times faster than constructing with CSRterm format 71 , and the C++ level sparseterm matrix construction releases the Python GIL for increased performanceterm. Once the matrix is constructed, distance value retrieval has an amortized constant time complexity 72 , and the DOK structure can be efficiently converted to a CSRterm, CSCterm or COO matrix to allow for speedy arithmetic operations.

In 2015, the cKDTreeterm·mth dual tree counting algorithmterm·mth 73 was enhanced to support weights 74 , which are essential in many scientific applications, for example, computing correlation functions of galaxies 75 .

Unified bindings to compiled code LowLevelCallable As of SciPyterm version 0.19, it is possible for users to wrap low-level functions in a scipy.LowLevelCallableterm·mth object that reduces the overheadterm of calling compiled C functions, such as those generated using Numba or Cython, directly from Python. Supported low-level functions include PyCapsule objects, ctypes function pointers and cffi function pointers. Furthermore, it is possible to generate a low-level callback function automatically from a Cython module using scipy.LowLevelCallableterm·mth.from_cython.

Cython bindings for BLAS, LAPACK and special SciPyterm has provided special functions and leveraged basic linear algebra subprograms (BLAS) and linear algebra package (LAPACK) 76 routines for many years. SciPyterm now additionally includes Cython 40 wrappers for many BLAS and LAPACK routines (added in 2015) and the special functions provided in the scipyterm.special subpackageterm (added in 2016), which are available in scipyterm.linalg.cython_blas, scipyterm.linalg.cython_lapack and scipyterm.special.cython_special, respectively. When writing algorithmsterm·mth in Cython, it is typically morepersName efficient to call directly into the libraries SciPyterm wraps rather than indirectly, using SciPyterm’s Python APIs. These low-level interfaces for Cython can also be used outside of the SciPyterm codebase to gain access to the functions in the wrapped libraries while avoiding the overheadterm of Python function calls. This can give performance gainsterm of one or two orders of magnitude for many use cases.

Developers can also use the low-level Cython interfacesterm without linking against the wrapped libraries 77 . This lets other extensions avoid the complexity of finding and using the correct libraries. Avoiding this complexity is especially important when wrapping libraries written in Fortran. Not only can these low-level wrappers be used without a Fortran compiler, they can also be used without having to handle all the different Fortran compiler ABIs and name mangling schemes.

Most of these low-level Cython wrappers are generated automatically to help with both correctness and ease of maintenance. The wrappers for BLAS and LAPACK are primarily generated using type information that is parsed from the BLAS and LAPACK source files using F2PY 19 , though a small number of routines use hand-written type signatures instead. The input and output types of each routine are saved in a data file that is read at build time and used to generate the corresponding Cython wrapper files. The wrappers in scipyterm.special.cython_special are also generated from a data file containing type information for the wrapped routines.

Since SciPyterm can be built with LAPACK 3.4.0 or later, Cython wrappers are only provided for the routines that maintain a consistent interface across all supported LAPACK versions. The standard BLAS interface provided by the various existing BLAS libraries is not currently changing, so changes are not generally needed in the wrappers provided by SciPyterm. Changes to the Cython wrappers for the functions in scipyterm.special follow corresponding changes to the interface of that subpackageterm.

Numerical optimization The scipyterm.optimize subpackageterm provides functions for the numerical solution of several classes of root finding and optimization problems. Here we highlight recent additions through SciPyterm 1.0.

Linear optimization A new interior-point optimizerterm for continuous linear programming problems, linprog with method = ’interior-point’, was released with SciPyterm 1.0. Implementing the core algorithmterm·mth of the commercial solver MOSEK 78 , it solves all of the 90+ NETLIB LP benchmark problems 79 tested. Unlike some interior point methods, this homogeneous self-dual formulationterm provides certificates of infeasibility or unboundedness as appropriate.

A presolve routineterm 80 solves trivial problems and otherwise performs problem simplifications, such as bound tightening and removal of fixed variables, and one of several routines for eliminating redundant equality constraints is automatically chosen to reduce the chance of numerical difficulties caused by singular matrices. Although the main solver implementation is pure Python, end-to-end sparseterm matrix support and heavy use of SciPyterm’s compiled linear system solvers—often for the same system with multiple right hand sides owing to the predictor-corrector approach—provide speed sufficient for problems with tens of thousands of variables and constraints.

Nonlinear optimization: local minimization The minimize functionterm provides a unified interface for finding local minima of nonlinear optimization problems. Four new methods for unconstrained optimization were added to minimize in recent versions of SciPyterm: dogleg, trust-ncg, trust-exact and trust-krylov. All are trust-region methods that build a local model of the objective function based on first and second derivative information, approximate the best point within a local ‘trust region’ and iterate until a local minimum of the original objective function is reached, but each has unique characteristics that make it appropriate for certain types of problems. For instance, trust-exact achieves fast convergence by solving the trust-region subproblem almost exactly, but it requires the second derivative Hessian matrix to be stored and factored every iteration, which may preclude the solution of large problems (≥1,000 variables). In contrast, trust-ncg and trust-krylov are well suited to large-scale optimization problems because they do not need to store and factor the Hessian explicitly, instead using second derivative information in a faster, approximate way. We compare the characteristics of all minimize methods in detail in Table 1 , which illustrates the level of completeness that SciPyterm aims for when covering a numerical method or topic. Table 1 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 98 , 99 100 101 – 103 104 , 105 105 106 , 107 108 – 111 112 105 105 , 113 105 , 114 115 , 116 62 , 117 Optimization methods from minimize, which solves problems of the form min x f x , where x ∈ R n and f : R n → R . ‘Version added’ specifies the algorithmterm·mth’s first appearance in SciPyterm. Algorithmsterm·mth with version added “0.6*” were added in version 0.6 or before. ‘Wrapper’ indicates whether the implementation available in SciPyterm 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 algorithmterm·mth 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 algorithmsterm·mth 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 algorithmterm·mth has a superlinear rate for the parameters used in SciPyterm, but can achieve a quadratic convergence rate with other parameter choices. ‘Global convergence’ is marked for the algorithmsterm·mth with guarantees of convergence to a stationary point (that is, a point x * for which ∇ f x * = 0 ); 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 algorithmterm·mth. The table also indicates which algorithmsterm·mth can deal with constraints on the variables. We distinguish among bound constraints ( x l ≤ x ≤ x u ), equality constraints ( c eq x = 0 ) and inequality constraints ( c ineq x ≥ 0 ).

Nonlinear optimization: global minimization As minimize may return any local minimum, some problems require the use of a global optimization routine. The new scipy.optimize.differential_evolutionterm function 81 , 82 is a stochastic global optimizerterm·mth that works by evolving a population of candidate solutions. In each iteration, trial candidates are generated by combination of candidates from the existing population. If the trial candidates represent an improvement, then the population is updated. Most recently, the SciPyterm benchmark suiteterm gained a comprehensive set of 196 global optimization problems for tracking the performanceterm of existing solvers over time and for evaluating whether the performanceterm of new solvers merits their inclusion in the package.

Statistical distributions The scipyterm.stats subpackageterm contains morepersName than 100 probability distributionsterm: 96 continuous and 13 discrete univariate distributions, and 10 multivariate distributions. The implementation relies on a consistent framework that provides methods to sample random variates, to evaluate the cumulative distribution function (CDF) and the probability density function (PDF), and to fit parameters for every distribution. Generally, the methods rely on specific implementations for each distribution, such as a closed-form expression of the CDF or a sampling algorithmterm·mth, if available. Otherwise, default methods are used based on generic code, for example, numerical integration of the PDF to obtain the CDF. Key recent distributions added to scipyterm.stats include the histogram-based distribution in scipyterm.stats.rv_histogram and the multinomial distribution in scipyterm.stats.multinomial (used, for example, in natural language processing 83 ).

Polynomial interpolators Historically, SciPyterm relied heavily on the venerable FITPACK Fortran library by P. Dierckx 53 , 84 for univariate interpolation and approximation of data, but the original monolithic design and API for interaction between SciPyterm and FITPACK was limiting for both users and developers.

Implementing a new, modular design of polynomial interpolators was spread over several releases. The goals of this effort were to have a set of basic objects representing piecewise polynomialsterm, to implement a collectionterm of algorithmsterm·mth for constructing various interpolators, and to provide users with building blocks for constructing additional interpolators.

At the lowest level of the new design are classes that represent univariate piecewise polynomialsterm: PPoly (SciPyterm 0.13) 85 , BPoly (SciPyterm 0.13) and BSpline (SciPyterm 0.19) 86 , which allow efficient vectorized evaluations, differentiation, integration and root-finding. PPoly represents piecewise polynomialsterm in the power basis in terms of breakpoints and coefficients at each interval. BPoly is similar and represents piecewise polynomialsterm in the Bernstein basis (which is suitable, for example, for constructing Bézier curves). BSpline represents spline curvesterm, that is, linear combinations of B-spline basis elementsterm 87 .

In the next layer, these polynomial classes are used to construct several common ways of interpolating data: CubicSpline (SciPyterm 0.18) 88 constructs a twice differentiable piecewise cubic function, Akima1DInterpolator and PCHIPInterpolator implement two classic prescriptions for constructing a C 1 continuous monotone shape-preserving interpolator 89 , 90 .

Test and benchmark suiteterm Test suiteterm·mth Test-driven development has been described as a way to manage fear and uncertainty when making code changes 91 . For each component of SciPyterm, we write multiple small executable tests that verify its intended behavior. The collectionterm of these, known as a ‘test suiteterm·mth’, increases confidence in the correctness and accuracyterm of the library, and allows us to make code modifications known not to alter desired behavior. According to the practice of continuous integrationterm 92 , all proposed contributions to SciPyterm are temporarily integrated with the master branch of the library before the test suiteterm·mth is run, and all tests must be passed before the contribution is permanently merged. Continuously monitoring the number of lines of code in SciPyterm covered by unit tests is one way we maintain some certainty that changes and new features are correctly implemented.

The SciPyterm test suiteterm·mth is orchestrated by a continuous integrationterm matrix that includes POSIX and Windows (32/64-bit) platforms managed by Travis CI and AppVeyor, respectively. Our tests cover Python versions 2.7, 3.4, 3.5, 3.6, and include code linting with pyflakes and pycodestyle. There are morepersName than 13,000 unit tests in the test suiteterm·mth, which is written for usage with the pytest ( https://docs.pytest.org/en/latest ) framework. In Fig. 2 , we show historical test coverageterm data generated using a Docker-based approach ( https://github.com/tylerjereddy/scipy-cov-track ). With the exception of the removal of ∼61,000 lines of compiled code for SciPyterm v0.14, the volume of both compiled (C, C++ and Fortran) and Python code has increased between releases, as have the number of lines covered by unit tests. Test coverageterm at the SciPyterm 1.0 release point was at 87% for Python code according to pytest-cov ( https://pypi.org/project/pytest-cov/ ). Coverage of compiled (C, C++ and Fortran) code was only 45% according to gcov ( https://gcc.gnu.org/onlinedocs/gcc/Gcov.html ), but the compiled codebase is much morepersName robust than this figure would suggest as the figure does not correct for the inclusion of reputable vendor code, the original library of which is well-tested; generated code, for which full coverage is impractical; and deprecated code, which does not require unit tests. Documentation for the code is automatically built and published by the CircleCI service to facilitate evaluation of documentation changes/integrity. Fig. 2 Python and compiled code volume in SciPyterm over time.

Benchmark suiteterm In addition to ensuring that unit tests are passing, it is important to confirm that the performanceterm of the SciPyterm codebase improves over time. Since February 2015, the performanceterm of SciPyterm has been monitored with Airspeed Velocity (asv https://github.com/airspeed-velocity/asv ). SciPyterm’s run.py script conveniently wraps asv features such that benchmark results over time can be generated with a single console command. For example, in Fig. 3 we illustrate the improvement of scipyterm.spatialterm.cKDTreeterm·mth.query over roughly nine years of project history. The tree used in the benchmark was generated without application of toroidal topology (boxsize = None), and tests were performed by Airspeed Velocity 0.4 using Python 2.7, NumPyterm 1.8.2 and Cython versions 0.27.3, 0.21.1 and 0.18 (for improved backward compatibility). Substantial performanceterm improvements were realized when cKDTreeterm·mth was fully Cythonized and again when it was rewritten in C++. Fig. 3 Results of the scipyterm.spatialterm.cKDTreeterm·mth.query benchmark from the introduction of cKDTreeterm·mth to the release of SciPyterm 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 timeterm·var of the benchmark for a commit in the master branch of SciPyterm.

Project organization and community Governance SciPyterm adopted an official governance document ( https://docs.scipyterm.org/doc/scipyterm/reference/dev/governance/governance.html ) on August 3, 2017. A steering councilterm, currently composed of 18 members, oversees daily development of the project by contributing code and reviewing contributions from the community. Council members have commit rights to the project repository, but they are expected to merge changes only when there are no substantive community objections. The chair of the steering councilterm, Ralf GommerspersName, is responsible for initiating biannual technical reviews of project direction and summarizing any private council activities to the broader community. The project’s benevolent dictator for life, Pauli VirtanenpersName, has overruling authority on any matter, but is expected to act in good faith and only exercise this authority when the steering councilterm cannot reach agreement.

SciPyterm’s official code of conduct was approved on October 24, 2017. In summary, there are five specific guidelines: be open to everyone participating in our community; be empathetic and patient in resolving conflicts; be collaborative, as we depend on each other to build the library; be inquisitive, as early identification of issues can prevent serious consequences; and be careful with wording. The code of conduct specifies how breaches can be reported to a code of conduct committee and outlines procedures for the committee’s response. Our diversity statement “welcomes and encourages participation by everyone.”

Maintainersterm and contributors The SciPyterm project has ~100 unique contributors for every 6-month release cycle. Anyone with the interest and skills can become a contributor; the SciPyterm contributor guide ( https://scipyterm.github.io/devdocs/dev/contributor/contributor_toc.html ) provides guidance on how to do that. In addition, the project currently has 15 active (volunteer) maintainersterm: people who review the contributions of others and do everything else needed to ensure that the software and the project move forward. Maintainersterm are critical to the health of the project 93 ; their skills and efforts largely determine how fast the project progresses, and they enable input from the much larger group of contributors. Anyone can become a maintainerterm, too, as they are selected on a rolling basis from contributors with a substantial history of high-quality contributions.

Funding The development cost of SciPyterm is estimated in excess of 10 million dollars by Open Hub ( https://www.openhub.net/p/scipyterm/estimated_cost ). Yet the project is largely unfunded, having been developed predominantly by graduate students, faculty and members of industry in their free time. Small amounts of funding have been applied with success: some meetings were sponsored by universities and industry, Google’s Summer of Code program supported infrastructure and algorithmterm·mth work, and teaching grant funds were used early on to develop documentation. However, funding from national agencies, foundations and industry has not been commensurate with the enormous stack of important software that relies on SciPyterm. MorepersName diverse spending to support planning, development, management and infrastructure would help SciPyterm remain a healthy underpinning of international scientific and industrial endeavors.

Downstream projects The scientific Python ecosystem includes many examples of domain-specific software libraries building on top of SciPyterm features and then returning to the base SciPy libraryterm to suggest and even implement improvements. For example, there are common contributors to the SciPyterm and Astropy core libraries 94 , and what works well for one of the codebases, infrastructures or communities is often transferred in some form to the other. At the codebase level, the binned_statistic functionality is one such cross-project contribution: it was initially developed in an Astropy-affiliated package and then placed in SciPyterm afterward. In this perspective, SciPyterm serves as a catalyst for cross-fertilization throughout the Python scientific computing community.

Discussion SciPyterm has a strong developer community and a massive user base. GitHub traffic metrics report roughly 20,000 unique visitors to the source website between 14 May 2018 and 27 May 2018 (near the time of writing), with 721 unique copies (‘clones’) of the codebase over that time period. The developer community at that time consisted of 610 unique contributors of source code, with morepersName than 19,000 commits accepted into the codebase (GitHub page data).

From the user side, there were 13,096,468 downloads of SciPyterm from the Python Packaging Index (PyPI) 95 and 5,776,017 via the default channel of the conda ( https://github.com/ContinuumIO/anaconda-package-data ) package manager during the year 2017. These numbers establish a lower bound on the total number of downloads by users given that PyPI and conda are only two of several popular methods for installing SciPyterm. The SciPyterm website ( http://www.scipyterm.org/ ), which has been the default citation in the absence of a peer-reviewed paper, has been cited over 3,000 times ( https://scholar.google.com/scholar?cites=2086009121748039507 ). Some of the most prominent uses of or demonstrations of credibility for SciPyterm include the LIGO-Virgo scientific collaboration that lead to the observation of gravitational waves 96 , the fact that SciPyterm is shipped directly with macOS and in the Intel distribution for Python 97 , and that SciPyterm is used by 47% of all machine learning projects on GitHub ( https://github.blog/2019-01-24-the-state-of-the-octoverse-machine-learning/ ).

Nevertheless, SciPyterm continually strives to improve. The SciPyterm Roadmap ( https://docs.scipyterm.org/doc/scipy-1.0.0/reference/roadmap.html , https://scipyterm.github.io/devdocs/roadmap.html ), summarized in Table 2 , is a continually updated document maintained by the community that describes some of the major directions for improvement for the project, as well as specific limitations and matters that require assistance moving forward. In addition to the items on the roadmap, we are still working to increase the number of SciPyterm usage tutorials beyond our current 15 section offering. Also, the low-level Cython code in our library (which interacts with C-level code and exposes it for Python usage) could use some measure of modernization, including migration to typed memoryviews to handle NumPyterm arrays. Table 2 Summary of SciPyterm Roadmap items following 1.0 release SciPyterm subpackageterm Summary of change optimize A few morepersName high-quality global optimizers fftpack Reduce overlap with NumPyterm equivalent linalg Reduce overlap with NumPyterm 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 morepersName recent version of LAPACK ndimage Clarify usage of the ‘data point’ coordinate model, and add additional wrapping modes sparseterm Incorporate sparseterm arrays from Sparseterm package 118 sparseterm.linalg Add PROPACK wrappers for faster SVD spatialterm Add support for (quaternion) rotation matrices special Precision improvements for hypergeometric, parabolic cylinder and spheroidal wave functions A problem faced by many open-source projects is attracting and retaining developers. Although it is normal for some individuals to contribute to a project for a while and then move on, too much turnoverterm can result in the loss of institutional memoryterm, leading to mistakes of the past being repeated, APIs of new code becoming inconsistent with the old code and a drifting project scope. We are fortunate that the SciPyterm project continues to attract enthusiastic and competent new developers while maintaining the involvement of a small but dedicated old guard. There are contributors who were present in the early years of the project who still contribute to discussions of bug reports and reviews of new code contributions. Our benevolent dictator for life has been with the project for morepersName than 10 years and is still actively contributing code, and the head of our steering councilterm, who also acts as a general manager, is approaching his eleventh anniversary. An additional half dozen or so active developers have been contributing steadily for five or morepersName years. The combination of a committed old guard and a host of new contributors ensures that SciPyterm will continue to grow while maintaining a high level of quality.

A final important challenge to address is the accommodation of GPU and distributed computingterm·mth without disrupting our conventional and heavily used algorithmterm·mth/API infrastructure. Although the exact approach we will adopt across the entire library to leverage these emerging technologies remains unclear, and was not a priority at the 1.0 release point, we now have a concrete implementation of a subpackageterm that allows for the experimental use of multiple backends, such as GPU-tractable data structuresterm, in the new scipyterm.fft. This will be described in detail in a future report.

Reporting Summary Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Supplementary information Reporting Summary

Interpretive notes.
• Highlighted spans are tagged entities: persName (author), title (venue), placeName (place), date (year), and term (a key concept: domain / ai / method).
• Eponymous or retrospective terms (e.g. “Nash equilibrium”, “segregation”) do not appear in the original source and so are not highlighted — a deliberate choice (see Report 4).
• Some entries begin with a word in capitals. EVIDENCE CORRECTED means the finding still stands and it was our quotation that was wrong — it has been replaced. RETRACTED means the entry itself was wrong; it stays on the page, marked, with its reason, rather than being deleted. WITHDRAWN AND REPLACED means a corrected version of it appears in the entries below. Each mark carries its own reason, because the reasons differ from one entry to the next. An entry we have WITHDRAWN is removed from this page and kept in the record, with its reason. A line reading Audit and a date is a later re-reading of the entry against its whole sentence: DOUBTFUL means it was kept, and the reason says what is loose about it.
• Quotation marks inside the tagger's sentence. Where a tag is the tagger's own sentence, a phrase in quotation marks inside it is borrowed from the paper — the tagger's wording around it is not. The paper's own sentence is the evidence quote shown on the same row, so the borrowing can be checked against the thing borrowed from without leaving this page. Nothing inside quotation marks anywhere on this page is ours: if it is quoted, it is the paper's. Whose words a concept carries. A concept entry records a term the paper itself uses, so the term, the sense given for it, and its evidence are the paper's own words, quoted where the paper fixes them. This is the opposite of a sense entry in the tag table, which is the tagger's sentence about how the paper uses a term. Where a concept entry could not be grounded in the paper's words, the entry says so on its own row.
• Counts: 1 work · 1 date.
Meta-Tagging Project · record virtanen2020-scipy-fundamental-algorithms-scientific-computing.
© 2026 Shir Sivroni