Skip to content

Commit

Permalink
Update test_besselaes.py
Browse files Browse the repository at this point in the history
fixed np.complex -> complex
  • Loading branch information
mbakker7 committed May 3, 2023
1 parent 6393149 commit 498f3cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_besselaes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# @pytest.mark.skip(reason="no fortran extension by default")
def potbesldho(x):
pot = besselaesnew.potbesldho(2.0, 1.0, np.complex(-3.0, -1.0), np.complex(2.0, 2.0),
pot = besselaesnew.potbesldho(2.0, 1.0, complex(-3.0, -1.0), complex(2.0, 2.0),
[0.0, 2.0, 11.0], x, 1, 3)
return pot

Expand All @@ -35,22 +35,22 @@ def test_potbesldho():

# @pytest.mark.skip(reason="no fortran extension by default")
def test_potbesldv():
potv = besselaesnew.potbesldv(2.0, 1.0, np.complex(-3.0, -1.0), np.complex(2.0, 2.0),
potv = besselaesnew.potbesldv(2.0, 1.0, complex(-3.0, -1.0), complex(2.0, 2.0),
[0.0, 2.0, 11.0], 1, 1, 3)
assert_allclose(potv[0], np.array([-0.31055947, -0.23498503, -0.30327438]))
assert_allclose(potv[1], np.array([-0.17694283, -0.15257055, -0.17583515]))


# @pytest.mark.skip(reason="no fortran extension by default")
def test_disbesldho():
qxqy_zero = besselaesnew.disbesldho(2.0, 1.0, np.complex(-3.0, -1.0), np.complex(2.0, 2.0),
qxqy_zero = besselaesnew.disbesldho(2.0, 1.0, complex(-3.0, -1.0), complex(2.0, 2.0),
[0.0, 2.0, 11.0], 0, 1, 3)
assert_allclose(qxqy_zero[0], np.array(
[-0.170131146, -0.18423853, -0.173157849]))
assert_allclose(qxqy_zero[1], np.array(
[0.0274405074, 0.0888068675, 0.0342656083]))

qxqy_one = besselaesnew.disbesldho(2.0, 1.0, np.complex(-3.0, -1.0), np.complex(2.0, 2.0),
qxqy_one = besselaesnew.disbesldho(2.0, 1.0, complex(-3.0, -1.0), complex(2.0, 2.0),
[0.0, 2.0, 11.0], 1, 1, 3)
assert_allclose(qxqy_one[0], np.array(
[-0.10412493, -0.1084466406, -0.104477618]))
Expand All @@ -60,7 +60,7 @@ def test_disbesldho():

# @pytest.mark.skip(reason="no fortran extension by default")
def test_disbesldv():
qxqyv = besselaesnew.disbesldv(2.0, 1.0, np.complex(-3.0, -1.0), np.complex(2.0, 2.0),
qxqyv = besselaesnew.disbesldv(2.0, 1.0, complex(-3.0, -1.0), complex(2.0, 2.0),
[0.0, 2.0, 11.0], 1, 1, 3)
assert_allclose(qxqyv[0], np.array(
[-0.17013114606375021, -0.18423853257632447, -0.17315784943727297]))
Expand Down

0 comments on commit 498f3cf

Please sign in to comment.