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.
8
5,473
Quick linear regression: scipy.stats.linregress(x, y) returns slope, intercept, rvalue, pvalue, stderr.
1
12
6,420
scipy.optimize contains functions for optimization and root finding
3
4,134
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…
73
373
68
3,281
397,005
Can compute eigenvalues and eigenvectors with linalg.eig().
1
11
6,294
Histogram bin heuristic: numpy.histogram_bin_edges(x, bins='fd') uses Freedman–Diaconis rule.
10
4,639
np.unique returns the unique elements of an array in sorted order.
1
1
16
6,617
np.linalg.pinv computes the Moore-Penrose pseudo inverse of a matrix.
1
15
6,127
numpy.random.zipf(a, n) generates n samples from a discrete power law with exponent a.
1
10
5,466
np.nan_to_num() replaces nan with 0, inf with max float, and -inf with min float.
1
1
12
6,512
Latin hypercube: scipy.stats.qmc.LatinHypercube(d).random(n) is a solid design-of-experiments default.
12
5,107
Lambert W poster: orcca.on.ca/LambertW/ scipy.special.lambertw
1
4
5,102
linalg.lstsq can solve over-determined linear systems. (lstsq ~ least squares)
1
9
6,513