Skip to content

Commit

Permalink
models: Fix Py2.7 compatibility
Browse files Browse the repository at this point in the history
Python 2.7 does not have a `@` operator, use `.dot()` instead.
  • Loading branch information
st-bender committed Jan 8, 2024
1 parent 55e87d8 commit b35a189
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/eppaurora/models/zhangpaxton2008.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def epstein_coeffs(angle, table):
if (2 * nf + 1) != len(coeffs):
raise ValueError("Number of coefficients is inconsistent.")
fs = np.arange(1, nf + 1)
cos = np.cos(fs * angle) @ coeffs[1:nf + 1]
sin = np.sin(fs * angle) @ coeffs[nf + 1:2 * nf + 1]
cos = np.cos(fs * angle).dot(coeffs[1:nf + 1])
sin = np.sin(fs * angle).dot(coeffs[nf + 1:2 * nf + 1])
return coeffs[0] + cos + sin


Expand Down

0 comments on commit b35a189

Please sign in to comment.