def tiny2zero(x, eps = 1e-15):
    mask = np.abs(x.copy()) <  eps
    x[mask] = 0
    return x
replace abs values smaller than eps by zero, makes copy
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/archive/linalg_decomp_1.py/tiny2zero