def contains_inf(arr):
 return (np.isinf(np.nanmax(arr)) or np.isinf(np.nanmin(arr)))

def contains_inf ( arr ) : return ( np . isinf ( np . nanmax ( arr ) ) or np . isinf ( np . nanmin ( arr ) ) )
test whether a numpy .