def _pinv_1d(v, eps=1e-05):
 return np.array([(0 if (abs(x) <= eps) else (1 / x)) for x in v], dtype=float)

def _pinv_1d ( v , eps = 1e-05 ) : return np . array ( [ ( 0 if ( abs ( x ) <= eps ) else ( 1 / x ) ) for x in v ] , dtype = float )
a helper function for computing the pseudoinverse .