Math and array tools#
Quiz: how do you return the indices of a vector
v = np.random.rand(100) that are greater than 0.4 but less than 0.6? If you answered
((v>0.4)*(v<0.6)).nonzero(), you’re right! But with Sciris, you can also just do
sc.findinds(v>0.4, v<0.6), which is a little easier.
Extensions to Numpy, including finding array elements and smoothing data.
Adaptive stochastic descent optimization algorithm, building on