def recipr(X):
 x = np.maximum(np.asarray(X).astype(np.float64), 0)
 return (np.greater(x, 0.0) / (x + np.less_equal(x, 0.0)))

def recipr ( X ) : x = np . maximum ( np . asarray ( X ) . astype ( np . float64 ) , 0 ) return ( np . greater ( x , 0.0 ) / ( x + np . less_equal ( x , 0.0 ) ) )
return the reciprocal of an array .