def test_masked_row_with_object_col():
 t = table.Table([[1]], dtype=['O'], masked=True)
 if NUMPY_LT_1_8:
  with pytest.raises(ValueError):
   t['col0'].mask = False
   t[0].as_void()
  with pytest.raises(ValueError):
   t['col0'].mask = True
   t[0].as_void()
 else:
  t['col0'].mask = False
  assert (t[0]['col0'] == 1)
  t['col0'].mask = True
  assert (t[0]['col0'] is np.ma.masked)

def test_masked_row_with_object_col ( ) : t = table . Table ( [ [ 1 ] ] , dtype = [ 'O' ] , masked = True ) if NUMPY_LT_1_8 : with pytest . raises ( ValueError ) : t [ 'col0' ] . mask = False t [ 0 ] . as_void ( ) with pytest . raises ( ValueError ) : t [ 'col0' ] . mask = True t [ 0 ] . as_void ( ) else : t [ 'col0' ] . mask = False assert ( t [ 0 ] [ 'col0' ] == 1 ) t [ 'col0' ] . mask = True assert ( t [ 0 ] [ 'col0' ] is np . ma . masked )
numpy < 1 .