def test_grouped_slicing(T1):
 for masked in (False, True):
  t1 = Table(T1, masked=masked)
  tg = t1.group_by('a')
  tg2 = tg[3:5]
  assert np.all((tg2.groups.indices == np.array([0, len(tg2)])))
  assert (tg2.groups.keys is None)

def test_grouped_slicing ( T1 ) : for masked in ( False , True ) : t1 = Table ( T1 , masked = masked ) tg = t1 . group_by ( 'a' ) tg2 = tg [ 3 : 5 ] assert np . all ( ( tg2 . groups . indices == np . array ( [ 0 , len ( tg2 ) ] ) ) ) assert ( tg2 . groups . keys is None )
test that slicing a table removes previous grouping .