Skip to content

Commit

Permalink
correct comments
Browse files Browse the repository at this point in the history
  • Loading branch information
seshasaibehara committed Oct 26, 2023
1 parent 38edb1c commit c366fac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/tests/clexulator/test_diff_clex.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ def test_gradients_of_correlations(diff_clexulator, session_shared_datadir):
# third row of gradients_of_correlations will be derviatives of all the 7 correlations with dz
derviatives_with_dz = gradients_of_correlations[2, :]

# derivative of \\Phi_{0} with dy will be 0.0
# derivative of \\Phi_{0} with dz will be 0.0
assert np.allclose(derviatives_with_dz[0], 0.0)
# derivative of \\Phi_{1} with dy will be 0.0
# derivative of \\Phi_{1} with dz will be 0.0
assert np.allclose(derviatives_with_dz[1], 0.0)
# derivative of \\Phi_{2} with dy will be 2 * dz
# derivative of \\Phi_{2} with dz will be 2 * dz
assert np.allclose(derviatives_with_dz[2], 2 * dz)
# derivative of \\Phi_{3} with dy will be 0.0
# derivative of \\Phi_{3} with dz will be 0.0
assert np.allclose(derviatives_with_dz[3], 0.0)
# derivative of \\Phi_{4} with dy will be 0.0
# derivative of \\Phi_{4} with dz will be 0.0
assert np.allclose(derviatives_with_dz[4], 0.0)
# derivative of \\Phi_{5} with dy will be 2 * \\sqrt(3) * dz (dx**2 + dy**2)
# derivative of \\Phi_{5} with dz will be 2 * \\sqrt(3) * dz (dx**2 + dy**2)
assert np.allclose(
derviatives_with_dz[5],
2 * np.sqrt(3) * dz * (np.power(dx, 2) + np.power(dy, 2)),
)
# derivative of \\Phi_{6} with dy will be 4 * dz**3
# derivative of \\Phi_{6} with dz will be 4 * dz**3
assert np.allclose(derviatives_with_dz[6], 4 * np.power(dz, 3))

0 comments on commit c366fac

Please sign in to comment.