def test_masking_regression_1795():
 t = Table.read(os.path.join(DATA, 'tb.fits'))
 assert np.all((t['c1'].mask == np.array([False, False])))
 assert np.all((t['c2'].mask == np.array([False, False])))
 assert np.all((t['c3'].mask == np.array([False, False])))
 assert np.all((t['c4'].mask == np.array([False, False])))
 assert np.all((t['c1'].data == np.array([1, 2])))
 assert np.all((t['c2'].data == np.array(['abc', 'xy '])))
 assert_allclose(t['c3'].data, np.array([3.70000007153, 6.6999997139]))
 assert np.all((t['c4'].data == np.array([False, True])))

def test_masking_regression_1795 ( ) : t = Table . read ( os . path . join ( DATA , 'tb.fits' ) ) assert np . all ( ( t [ 'c1' ] . mask == np . array ( [ False , False ] ) ) ) assert np . all ( ( t [ 'c2' ] . mask == np . array ( [ False , False ] ) ) ) assert np . all ( ( t [ 'c3' ] . mask == np . array ( [ False , False ] ) ) ) assert np . all ( ( t [ 'c4' ] . mask == np . array ( [ False , False ] ) ) ) assert np . all ( ( t [ 'c1' ] . data == np . array ( [ 1 , 2 ] ) ) ) assert np . all ( ( t [ 'c2' ] . data == np . array ( [ 'abc' , 'xy ' ] ) ) ) assert_allclose ( t [ 'c3' ] . data , np . array ( [ 3.70000007153 , 6.6999997139 ] ) ) assert np . all ( ( t [ 'c4' ] . data == np . array ( [ False , True ] ) ) )
regression test for #1795 - this bug originally caused columns where tnull was not defined to have their first element masked .