mrkeyoor.com_
Sun 20 Sept 00:58 UTC
PyPIDataupdated 19 Sept 2026

scipy review

SciPy 1.18.1 supplies numerical algorithms that operate on NumPy arrays, including optimization, integration, interpolation, statistics, signal processing, sparse linear algebra, spatial searches, special functions, image operations, and FFTs. Version 1.18.1 adds no new user-facing functions over 1.18.0; it is a corrective release that publishes Python 3.15 wheels and raises the source-build GCC minimum to 10.3. The 1.18 series also expands batched linear algebra, ILP64 BLAS work, Array API coverage, FFT backends, and smoothing methods.

Verdict

SciPy 1.18.1 installed in 0.9 seconds but consumed 168 MB in our sandbox, a good trade only when the application needs its compiled numerical methods rather than basic NumPy operations. Confirm wheel support, convergence signals, and backend compatibility before putting it on a constrained target.

We installed it

Lab card: what happened when we installed scipyScreenshot of scipy documentation
Install✓ · 0.9s2 packages on disk · 168 MB
Importimport scipy in 0.39s · compiled extensions · requires Python >=3.12
Known vulns0(pip-audit)

Answers from our run

Does scipy install cleanly?

Yes. In a fresh container with an empty cache, pip install scipy finished in 0.9s, leaving 2 packages and 168 MB on disk. pip-audit reported no known vulnerabilities.

What does scipy need to run?

Python >=3.12, and a platform wheel with compiled extensions. In our run import scipy succeeded in 0.39s.

scipy or numpy: which should you use?

numpy: Use it when arrays, vectorization, dense linear algebra, and basic transforms cover the computation. SciPy 1.18.1 installed in 0.9 seconds but consumed 168 MB in our sandbox, a good trade only when the application needs its compiled numerical methods rather than basic NumPy operations.

When should you not use scipy?

If arrays, broadcasting, basic FFTs, and dense linear algebra are enough, NumPy avoids the 168 MB environment measured for SciPy.

API stability4/5SciPy 1.18.1 preserves mature submodule boundaries and normally deprecates public behavior before removal. Scientific code still needs upgrade tests because feature releases change supported Python and NumPy versions, result details, algorithms, and defaults. The 1.18 line includes BLAS integer-width work, FFT changes, more batched routines, and altered build requirements even though 1.18.1 itself is a bug-fix patch.
Docs5/5The SciPy documentation has tutorials and generated references for every major submodule, with parameter definitions, return objects, mathematical notes, examples, and cross-links to related algorithms. Release notes state feature changes, deprecations, backend status, and compiler requirements. Documentation cannot decide a user's hypotheses, tolerances, constraints, or convergence criteria, so numerical judgment still sits with the caller.
Maintenance5/5The scipy/scipy repository is unarchived and was pushed on August 26, 2026. GitHub reports 14,952 stars and 1,843 open issues and pull requests across a very broad codebase. Version 1.18.1 shipped on August 21 as a focused corrective release with Python 3.15 wheels and trusted PyPI publishing, following a feature line with work across algorithms, builds, performance, and documentation.
Ecosystem5/5The supplied registry estimate is about 93.7 million SciPy downloads per week, and GitHub reports 14,952 stars. SciPy sits underneath scientific analysis, statistics, optimization, signal work, and machine learning. NumPy conventions let its arrays and results move into pandas, scikit-learn, plotting tools, and domain packages, while wheels distribute compiled numerical libraries to common platforms.

Discussed on

  1. hnSciPy builds for Python 3.12 on Windows are a minor miracle475 points
  2. hnScipy Lecture Notes – Learn numerics, science, and data with Python473 points
  3. hnSciPy 1.0: fundamental algorithms for scientific computing in Python387 points
  4. hnCuPy: NumPy and SciPy for GPU377 points
  5. hnScipy 1.0 released370 points

Use it if

  • A NumPy application needs established solvers, distributions, optimizers, filters, interpolation, transforms, or integration routines.
  • Compiled implementations of standard numerical algorithms are preferable to maintaining equivalent Python code.
  • One analysis crosses scientific domains and benefits from common ndarray and result-object conventions.
  • Sparse matrices, sparse arrays, and sparse solvers must live beside dense NumPy operations.
Skip it if

Setup reality

Our SciPy 1.18.1 install used a wheel and completed in 0.9 seconds in a fresh Python 3.12 Bookworm container. The environment held 2 packages and occupied 168 MB. pip-audit found 0 known vulnerabilities. Package metadata contains 40 dependency entries, requires Python 3.12+, and ships compiled .so extensions. import scipy succeeded in 0.39 seconds, while our inspection found no py.typed marker.

SciPy needs no credentials or application config. Wheel availability is the deciding installation detail. Building version 1.18.1 from source requires GCC 10.3 or newer plus the native numerical toolchain. BLAS and LAPACK selection affects speed, supported integer widths, and redistribution. The measured binary includes license notices for SciPy, OpenBLAS, LAPACK, GCC runtime libraries, and libquadmath, so vendors should retain the wheel's notices rather than reducing them to one label.

Import routines from submodules such as scipy.optimize and scipy.stats; the top-level name is not a flat catalog. Many calls return result objects whose status, convergence flag, or warning matters as much as the computed array. A populated result.x does not mean an optimizer succeeded. Sparse arrays and older sparse matrices differ in multiplication and shape behavior, so choose one model explicitly in new code.

Numerical defaults encode assumptions about scale and data. Set bounds, axes, tolerances, missing-value behavior, and random generators where those choices affect conclusions. SciPy 1.18 broadens batched operations and experimental Array API paths, but backend coverage is still per function. Test the exact call before assuming a CuPy, JAX, or other array can travel through an entire pipeline without returning to NumPy.

Patterns

Minimize with explicit bounds minimize-objective

from scipy.optimize import minimize; result = minimize(loss, x0=[0.0, 0.0], bounds=[(-2, 2), (-2, 2)])

Read `result.success` and `result.message` before trusting the returned parameters. A result array exists even after some failures.

Integrate an initial-value problem solve-initial-value-problem

from scipy.integrate import solve_ivp; solution = solve_ivp(rhs, (0, 10), y0=[1.0], rtol=1e-7, atol=1e-9)

Tolerances must match the scale of the state. Check `solution.success` and inspect any event or step failures.

Compare two independent samples run-hypothesis-test

from scipy.stats import mannwhitneyu; result = mannwhitneyu(a, b, alternative='two-sided')

The study design and sampling process decide whether this nonparametric test and its assumptions make sense.

Filter offline data without phase shift filter-signal

from scipy.signal import butter, sosfiltfilt; sos = butter(4, 20, btype='low', fs=rate, output='sos'); filtered = sosfiltfilt(sos, samples)

`sosfiltfilt` reads future samples, so this result cannot be reproduced by a causal live filter.

Interpolate without overshoot interpolate-points

from scipy.interpolate import PchipInterpolator; curve = PchipInterpolator(x, y, extrapolate=False); output = curve(query_x)

Input `x` values must be unique and ordered. With extrapolation disabled, queries beyond the data range return NaN.

Solve a sparse system solve-sparse-system

from scipy.sparse import csr_array; from scipy.sparse.linalg import spsolve; x = spsolve(csr_array(matrix), b)

Check the residual and warnings because singular or poorly conditioned matrices can still produce numeric output.

Find nearby points with a KD-tree find-nearest-neighbors

from scipy.spatial import cKDTree; distance, index = cKDTree(points).query(targets, k=3)

Distance depends on coordinate scale. Normalize dimensions first when their units should contribute comparably.

Transform a real-valued signal compute-fast-fourier-transform

from scipy.fft import rfft, rfftfreq; spectrum = rfft(samples); frequencies = rfftfreq(len(samples), d=1 / rate)

Detrending and windowing are separate choices; both can materially change how the frequency bins are interpreted.

Fit parameters to a nonlinear curve fit-nonlinear-curve

from scipy.optimize import curve_fit

params, covariance = curve_fit(model, x, y, p0=[1.0, 0.1], bounds=(0, float('inf')))
errors = covariance.diagonal() ** 0.5

Parameter errors assume the fitted model and data conditions justify the covariance estimate. Inspect residuals instead of reporting the diagonal alone.

Apply a Gaussian image filter smooth-image

from scipy.ndimage import gaussian_filter

smoothed = gaussian_filter(image, sigma=(1.5, 1.5), mode='reflect')

`sigma` is measured in pixels along each axis. Channel dimensions need a zero sigma or separate handling to avoid mixing colors.

Evaluate a stable logistic function stable-logistic-function

from scipy.special import expit

probability = expit(logits)

`expit` avoids the direct exponential expression that can overflow for large negative inputs.

Solve a dense linear equation solve-dense-system

from scipy.linalg import solve

x = solve(a, b, assume_a='pos')

Set `assume_a='pos'` only for a positive-definite matrix. A wrong structural promise can select an unsuitable solver.

Alternatives

PackageRegistryPick it when
numpyPyPIUse it when arrays, vectorization, dense linear algebra, and basic transforms cover the computation.
statsmodelsPyPIUse it for fitted statistical models, inference summaries, diagnostics, and econometric workflows.
scikit-learnPyPIUse it for estimators, preprocessing, model selection, and machine-learning pipelines built on the scientific stack.

More data guides

numpy · fsspec · pandas · pyarrow · sqlalchemy · s3fs · the whole shelf →

How this guide is made: grounded in the library's documentation, release notes, changelog, and issue history, on a fixed rubric — not a hands-on install of every release. The 50 most-downloaded entries are additionally install-verified in clean containers. Corrections: contact the desk.