Esempio n. 1
0
 def test16(self):
     self.assertEqual(
         (4, ),
         indexing.shape_after_index(
             (2, 3), [[True, False, True], [True, False, True]]))
     self.assertEqual((1, 3),
                      indexing.shape_after_index((2, 3), [True, False]))
Esempio n. 2
0
 def test14(self):
     self.assertEquals((5,4,2), indexing.shape_after_index((5,4,2), numpy.s_[:10,...,...]))
     self.assertEquals((5,4,2), indexing.shape_after_index((5,4,2), numpy.s_[...,:10,...]))
     self.assertEquals((4,4,2), indexing.shape_after_index((5,4,2), numpy.s_[1:10,...,...]))
     self.assertEquals((1,4,2), indexing.shape_after_index((5,4,2), numpy.s_[-1:,...,...]))
     self.assertEquals((2,4,2), indexing.shape_after_index((5,4,2), numpy.s_[-2:,...,...]))
     self.assertEquals((1,4,2), indexing.shape_after_index((5,4,2), numpy.s_[-2:-1,...,...]))
     self.assertEquals((5,4,2), indexing.shape_after_index((5,4,2), numpy.s_[-10:,...,...]))
Esempio n. 3
0
 def test12(self):
     self.assertEquals((1,4,2), indexing.shape_after_index((5,4,2), numpy.s_[1:2,...,...])) 
     self.assertEquals((1,4,2), indexing.shape_after_index((5,4,2), numpy.s_[1:2,:,:])) 
     self.assertEquals((2,4,2), indexing.shape_after_index((5,4,2), numpy.s_[1:3,...,...])) 
     self.assertEquals((2,4,2), indexing.shape_after_index((5,4,2), numpy.s_[1:3,:,:])) 
     self.assertEquals((2,1,2), indexing.shape_after_index((5,4,2), numpy.s_[1:3,2:3,...])) 
     self.assertEquals((2,1,2), indexing.shape_after_index((5,4,2), numpy.s_[1:3,2:3,:])) 
Esempio n. 4
0
 def test16(self):
     self.assertEquals((4,), indexing.shape_after_index((2,3), [[True, False, True],[True,False,True]]))
     self.assertEquals((1,3), indexing.shape_after_index((2,3), [True, False]))
Esempio n. 5
0
 def shape(self):
     return indexing.shape_after_index(self._private.grid.shape, self._private.indices )
Esempio n. 6
0
 def shape(self):
     return indexing.shape_after_index(self._private.grid.shape, self._private.indices )