def test_contains_nan():
 arr = np.random.random(100)
 assert (not contains_nan(arr))
 arr[0] = np.nan
 assert contains_nan(arr)

def test_contains_nan ( ) : arr = np . random . random ( 100 ) assert ( not contains_nan ( arr ) ) arr [ 0 ] = np . nan assert contains_nan ( arr )
tests that pylearn2 .