Ejemplo n.º 1
0
 def test_ndmapping_slice_upper_bound_exclusive_int(self):
     ndmap = NdMapping(self.init_item_odict, kdims=[self.dim1, self.dim2])
     self.assertEqual(ndmap[1:5].keys(), [(1, 2.0)])
Ejemplo n.º 2
0
 def test_idxmapping_groupby_unsorted(self):
     data = [(('B', 2), 1), (('C', 2), 2), (('A', 1), 3)]
     grouped = NdMapping(data, sort=False, kdims=['X', 'Y']).groupby('Y')
     self.assertEquals(grouped.keys(), [2, 1])
     self.assertEquals(grouped.values()[0].keys(), ['B', 'C'])
     self.assertEquals(grouped.last.keys(), ['A'])
Ejemplo n.º 3
0
 def test_ndmapping_slice_lower_bound_inclusive2_int(self):
     ndmap = NdMapping(self.init_item_odict, kdims=[self.dim1, self.dim2])
     self.assertEqual(ndmap[1:6].keys(), [(1, 2.0), (5, 3.0)])
Ejemplo n.º 4
0
 def test_idxmapping_groupby_unsorted(self):
     data = [(('B', 2), 1), (('C', 2), 2), (('A', 1), 3)]
     grouped = NdMapping(data, sort=False, kdims=['X', 'Y']).groupby('Y')
     self.assertEquals(grouped.keys(), [1, 2])
     self.assertEquals(grouped.values()[0].keys(), ['A'])
     self.assertEquals(grouped.last.keys(), ['B', 'C'])