Exemple #1
0
 def test_sortby_12(self):
     "sortby test #12"
     lar = rand(0,2)
     theory = lar.copy()
     practice = sortby(lar, 0, 1)
     msg="Sorting empty larry failed"
     ale(theory, practice, msg=msg)
Exemple #2
0
 def test_sortby_6(self):
     "sortby test #6"
     theory = self.lar
     practice = sortby(self.lar, 'e', 1, reverse=True)
     msg="Reverse sorting by element in axis 1 failed"
     ale(theory, practice, msg=msg)
Exemple #3
0
 def test_sortby_7(self):
     "sortby test #7"
     theory = larry([[]])
     practice = sortby(theory, 0, 0)
     msg = "Sorting empty larry failed"
     ale(theory, practice, msg=msg)
Exemple #4
0
 def test_sortby_5(self):
     "sortby test #5"
     theory = self.lar[:,[0, 2, 1]]
     practice = sortby(self.lar, 'b', 0, reverse=True)
     msg = "Reverse sorting by element in axis 0 failed"
     ale(theory, practice, msg=msg)
Exemple #5
0
 def test_sortby_4(self):
     "sortby test #4"
     theory = self.lar[[1, 0],:]
     practice = sortby(self.lar, 'e', -1)
     msg="Sorting by element in axis -1 failed"
     ale(theory, practice, msg=msg)
Exemple #6
0
 def test_sortby_3(self):
     "sortby test #3"
     theory = self.lar[:,[1, 2, 0]]
     practice = sortby(self.lar, 'b', -2)
     msg = "Sorting by element in axis -2 failed"
     ale(theory, practice, msg=msg)
Exemple #7
0
 def test_sortby_4(self):
     "sortby test #4"
     theory = self.lar[[1, 0], :]
     practice = sortby(self.lar, 'e', -1)
     msg = "Sorting by element in axis -1 failed"
     ale(theory, practice, msg=msg)
Exemple #8
0
 def test_sortby_3(self):
     "sortby test #3"
     theory = self.lar[:, [1, 2, 0]]
     practice = sortby(self.lar, 'b', -2)
     msg = "Sorting by element in axis -2 failed"
     ale(theory, practice, msg=msg)