Tweets about SciPy (Scientific Python) and related topics from @JohnDCook.

Houston
Joined February 2011
Distributions in scipy.stats have a method sf for the survival function, i.e. complementary CDF.
1
1,247
Quick linear regression: scipy.stats.linregress(x, y) returns slope, intercept, rvalue, pvalue, stderr.
11
5,836
scipy.optimize contains functions for optimization and root finding
3
4,017
Scientific Python retweeted
I read this and I'm terrified, the situation seems intractable. In the python ecosystem alone every cpython install, venv, UV is at risk. Don't get my started on npm, pnpm, yarn, go, rust. My current 2026 security posture: stay home and only connect to the internet from a trusted ISP. The winter is coming. discuss.python.org/t/informa…
72
372
68
3,276
392,915
Can compute eigenvalues and eigenvectors with linalg.eig().
1
11
6,278
Histogram bin heuristic: numpy.histogram_bin_edges(x, bins='fd') uses Freedman–Diaconis rule.
10
4,632
np.unique returns the unique elements of an array in sorted order.
1
1
16
6,609
np.linalg.pinv computes the Moore-Penrose pseudo inverse of a matrix.
1
15
6,120
numpy.random.zipf(a, n) generates n samples from a discrete power law with exponent a.
1
10
5,464
np.nan_to_num() replaces nan with 0, inf with max float, and -inf with min float.
1
1
12
6,510
Latin hypercube: scipy.stats.qmc.LatinHypercube(d).random(n) is a solid design-of-experiments default.
12
5,105
Lambert W poster: orcca.on.ca/LambertW/ scipy.special.lambertw
1
4
5,101
linalg.lstsq can solve over-determined linear systems. (lstsq ~ least squares)
1
9
6,512
Interested in DSP? See SciPy's signal and ndimage subpackages.
1
7
6,454