Scientific Python (@SciPyTip) header
Scientific Python (@SciPyTip) profile picture

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

Houston
Joined February 2011
Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)Photo by Scientific Python (@SciPyTip)
numpy.var calculates population variance by default. With optional parameter ddof=1 it computes sample variance.
4
3,282
To issue a shell command in IPython, prefix the command with !
1
10
5,086
scipy.integrate has three routines for computing integrals from samples: trapz (trapezoid), simps (Simpson's), romb (Romberg).
8
4,519
scipy.special has functions sindg, cosdg, and tandg for computing trig functions of arguments in degrees.
10
4,191
Gauss' original hypergeometric function, now known as 2F1, is implemented in scipy.special.hyp2f1.
15
6,373
FiPy is a Finite Volume PDE solver written in Python ctcms.nist.gov/fipy
1
14
4,884
The function scipy.special.psi is the derivative of the logarithm of scipy.special.gamma.
14
6,265
The confluent hypergeometric function is implemented in scipy.special.hyp1f1.
10
4,887
Stiff ODEs: try method='Radau' or 'BDF' in solve_ivp when RK45 struggles.
7
5,896
The function numpy.empty() creates an array without initializing its elements.
23
6,685
Robert Godin and I have a new textbook out today. The book only requires some knowledge of Python and some college mathematics. Introduction to Machine Learning and Artificial Intelligence with Python. 741 pages. NumPy and Pandas, regression, classification, time series, a neural net with backpropagation, then PyTorch. Then transformers, and how current language models are actually built: the key-value cache, grouped-query attention, mixture of experts, quantization. Reinforcement learning. The last chapter is about shipping the code to production. Exercises have solutions. Paperback: amazon.com/dp/B0HT2JWXQ5/ Kindle edition: amazon.com/dp/B0GX32CJ74
1
14
2,687
Nonlinear constraints: scipy.optimize.minimize(..., constraints=..., method='trust-constr') handles eq/ineq constraints.
15
5,766
The transpose method T returns a VIEW, not a copy and not an in-place transformation. The matrix doesn't change.
12
6,187
XlsxWriter: Python module for creating Excel XLSX files xlsxwriter.readthedocs.org/
14
6,006
The package scipy.odr is for orthogonal distance regression. (Minimize squared orthogonal distance rather than squared vertical distance.)
1
1
20
5,747
scipy.special.ellipj computes the Jacobi elliptic functions sn, cn, and dn.
11
4,408