def test_invalid_sigma_clip():
 data = np.ones((5, 5))
 data[(2, 2)] = 1000
 data[(3, 4)] = np.nan
 data[(1, 1)] = np.inf
 result = sigma_clip(data)
 assert result.mask[(2, 2)]
 assert result.mask[(3, 4)]
 assert result.mask[(1, 1)]

def test_invalid_sigma_clip ( ) : data = np . ones ( ( 5 , 5 ) ) data [ ( 2 , 2 ) ] = 1000 data [ ( 3 , 4 ) ] = np . nan data [ ( 1 , 1 ) ] = np . inf result = sigma_clip ( data ) assert result . mask [ ( 2 , 2 ) ] assert result . mask [ ( 3 , 4 ) ] assert result . mask [ ( 1 , 1 ) ]
test sigma_clip of data containing invalid values .