aliquot

< a quantity that can be divided into another a whole number of time />

September 20, 2019

TIL about Numpy where. (via John Cook) #python

from numpy import where
from scipy import stats
x = stats.norm.rvs(loc=0, scale=1, size=10)
where(x < 0, 0, 1)