Skip to content

Commit

Permalink
Merge pull request #242 from pollytur/core3d_bn_fix
Browse files Browse the repository at this point in the history
Factorial fix
  • Loading branch information
yongrong-qiu authored Jun 6, 2024
2 parents 5947994 + 2da2835 commit a2055cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neuralpredictors/layers/hermite.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def hermite_2d(N, npts, xvalmax=None):
for i, (mui, nui, desci) in enumerate(zip(mu, nu, desc)):
radvals = polyval(radsq, hermite_coefficients(mui, nui))
basis = gaussian * (radsq ** (mui / 2)) * radvals * np.exp(1j * mui * theta)
basis /= np.sqrt(2 ** (mui + 2 * nui) * pi * math.factorial(mui + nui) * math.factorial(nui))
basis /= np.sqrt(2 ** (mui + 2 * nui) * pi * math.factorial(int(mui + nui)) * math.factorial(int(nui)))
if desci == "z":
H[i] = basis.real / np.sqrt(2)
elif desci == "r":
Expand Down

0 comments on commit a2055cd

Please sign in to comment.