The NumPy where function is like a vectorized switch that you can use to combine two arrays.
Finding the mode of an empirical continuous distribution
You can find the mode of an empirical continuous distribution by plotting the histogram and looking for the maximum bin.
NumPy all: Understanding np.all()
The np.all() function tests whether all elements in a NumPy array evaluate to true.
Binary cross entropy explained
A simple NumPy implementation of the binary cross entropy loss function and some intuition about why it works.
Filtering DataFrames with the .query() method in Pandas
Pandas provides a .query() method on DataFrame's with a convenient string syntax for filtering DataFrames. This post describes the method and gives simple usage examples.
Linear interpolation in Python: An np.interp() example
It's easy to linearly interpolate a 1-dimensional set of points in Python using the np.interp() function from NumPy.
NumPy meshgrid: Understanding np.meshgrid()
You can create multi-dimensional coordinate arrays using the np.meshgrid() function, which is also available in PyTorch and TensorFlow. But watch out! PyTorch uses different indexing by default so the results might not be the same.