def test_jacobi_matrix_5(self):
     if self.writeData:
         J = gq.jacobi_matrix(gq.r_hermite(5))
         np.savez('data/test_jacobi_matrix_5.npz',J=J)
         
     data = helper.load_test_npz('test_jacobi_matrix_5.npz')
     J = data['J']
     np.testing.assert_almost_equal(gq.jacobi_matrix(gq.r_hermite(5)), J)
 def test_r_hermite_5(self):
     v = gq.r_hermite(5)
     self.assertIsInstance(v, np.ndarray)
     np.testing.assert_almost_equal(
         v,
         np.array([[0.0, 1.0], [0.0, 1.0], [0.0, 2.0], [0.0, 3.0],
                   [0.0, 4.0], [0.0, 5.0]]))
 def test_jacobi_matrix_5(self):
     gq.jacobi_matrix(gq.r_hermite(5))
 def test_r_hermite_5(self):
     v = gq.r_hermite(5)
     self.assertIsInstance(v, np.ndarray)
     np.testing.assert_almost_equal(v, np.array([[0.0, 1.0], [0.0, 1.0], [0.0, 2.0], [0.0, 3.0], [0.0, 4.0], [0.0, 5.0]]))
 def test_r_hermite_1(self):
     v = gq.r_hermite(1)
     self.assertIsInstance(v, np.ndarray)
     np.testing.assert_almost_equal(v, np.array([[0.0, 1.0]]))
Example #6
0
 def test_jacobi_matrix_5(self):
     data = helper.load_test_npz('test_jacobi_matrix_5.npz')
     J = data['J']
     np.testing.assert_equal(gq.jacobi_matrix(gq.r_hermite(5)), J)
Example #7
0
 def test_r_hermite_2(self):
     v = gq.r_hermite(2)
     self.assertIsInstance(v, np.ndarray)
     np.testing.assert_equal(v, np.array([[0.0, 1.0], [0.0, 0.5], [0.0, 1.0]]))
 def test_jacobi_matrix_5(self):
     gq.jacobi_matrix(gq.r_hermite(5))
 def test_r_hermite_1(self):
     v = gq.r_hermite(1)
     self.assertIsInstance(v, np.ndarray)
     np.testing.assert_almost_equal(v, np.array([[0.0, 1.0]]))