SciPyTip's profile picture. Tweets about SciPy (Scientific Python) and related topics from @JohnDCook.

Scientific Python

@SciPyTip

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

Python's sys.float_info is analogous to C's float.h header.


Triple quoted strings and regular expressions johndcook.com/blog/2021/01/3…


How to use regular expressions in Pandas kanoki.org/2019/11/12/how…


The sum of the inradii is the same for all triangulations of a cyclic polygon. Python code for generating illustrations of the theorem. johndcook.com/blog/2025/11/0…

SciPyTip's tweet image. The sum of the inradii is the same for all triangulations of a cyclic polygon.

Python code for generating illustrations of the theorem.

johndcook.com/blog/2025/11/0…

Singular value decomposition and pseudoinverse johndcook.com/blog/2018/05/0…


K-means clustering and vector quantization: scipy.cluster.vq


Permute a list x in place: np.random.shuffle(x)


With NimPy code for computing the surface area and volume of a tetrahedron

Tetrahedral analog of the Pythagorean theorem johndcook.com/blog/2025/11/0…

AlgebraFact's tweet image. Tetrahedral analog of the Pythagorean theorem

johndcook.com/blog/2025/11/0…


PyCppAD: Python wrapper around the CppAD algorithmic differentiation library github.com/b45ch1/pycppad


Join NumPy arrays x and y into one array: np.concatenate((x, y)). Note that argument must be a tuple.


numpy.var calculates population variance by default. With optional parameter ddof=1 it computes sample variance.


To issue a shell command in IPython, prefix the command with !


scipy.integrate has three routines for computing integrals from samples: trapz (trapezoid), simps (Simpson's), romb (Romberg).


scipy.special has functions sindg, cosdg, and tandg for computing trig functions of arguments in degrees.


Gauss' original hypergeometric function, now known as 2F1, is implemented in scipy.special.hyp2f1.


FiPy is a Finite Volume PDE solver written in Python ctcms.nist.gov/fipy


With Python code, as usual x.com/algebrafact/st…

Freshman's dream is an equation that's a naive mistake, except its true in the right context. johndcook.com/blog/2025/10/2…

AlgebraFact's tweet image. Freshman's dream is an equation that's a naive mistake, except its true in the right context.

johndcook.com/blog/2025/10/2…


Loading...

Something went wrong.


Something went wrong.