コード例 #1
0
 def test_sort_5(self):
     y = np.array([np.random.randint(100) for i in range(100)], dtype=int)
     y2 = np.copy(y)
     bm.sort(y)
     y2.sort()
     np.testing.assert_equal(y, y2)
     bm.sort(y, reverse=True)
     y2 = sorted(y2, reverse=True)
     np.testing.assert_equal(y, y2)
コード例 #2
0
ファイル: test_blondmath.py プロジェクト: dquartul/BLonD
 def test_sort_3(self):
     y = np.random.randn(200)
     y2 = np.copy(y)
     bm.sort(y)
     y2.sort()
     np.testing.assert_equal(y, y2)
     bm.sort(y, reverse=True)
     y2 = sorted(y2, reverse=True)
     np.testing.assert_equal(y, y2)
コード例 #3
0
 def test_sort_3(self):
     y = np.random.randn(200)
     y2 = np.copy(y)
     bm.sort(y)
     y2.sort()
     np.testing.assert_equal(y, y2)
     bm.sort(y, reverse=True)
     y2 = sorted(y2, reverse=True)
     np.testing.assert_equal(y, y2)
コード例 #4
0
ファイル: test_blondmath.py プロジェクト: dquartul/BLonD
 def test_sort_5(self):
     y = np.array([np.random.randint(100)
                   for i in range(100)], dtype=int)
     y2 = np.copy(y)
     bm.sort(y)
     y2.sort()
     np.testing.assert_equal(y, y2)
     bm.sort(y, reverse=True)
     y2 = sorted(y2, reverse=True)
     np.testing.assert_equal(y, y2)
コード例 #5
0
 def test_sort_2(self):
     y = np.random.randn(200)
     y2 = np.copy(y)
     np.testing.assert_equal(bm.sort(y, reverse=True),
                             sorted(y2, reverse=True))
コード例 #6
0
 def test_sort_1(self):
     y = np.random.randn(100)
     y2 = np.copy(y)
     y2.sort()
     np.testing.assert_equal(bm.sort(y), y2)
コード例 #7
0
ファイル: test_blondmath.py プロジェクト: dquartul/BLonD
 def test_sort_2(self):
     y = np.random.randn(200)
     y2 = np.copy(y)
     np.testing.assert_equal(bm.sort(y, reverse=True),
                             sorted(y2, reverse=True))
コード例 #8
0
ファイル: test_blondmath.py プロジェクト: dquartul/BLonD
 def test_sort_1(self):
     y = np.random.randn(100)
     y2 = np.copy(y)
     y2.sort()
     np.testing.assert_equal(bm.sort(y), y2)