Skip to content

Commit 464b47a

Browse files
ojdfmatthewtownson
authored andcommitted
force use of integers in zernike factorials
1 parent 2240486 commit 464b47a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aotools/functions/zernike.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def zernikeRadialFunc(n, m, r):
9191
R += numpy.array(r**(n - 2 * i) * (((-1)**(i)) *
9292
math.factorial(n - i)) /
9393
(math.factorial(i) *
94-
math.factorial(0.5 * (n + m) - i) *
95-
math.factorial(0.5 * (n - m) - i)),
94+
math.factorial((n + m)//2 - i) *
95+
math.factorial((n - m)//2 - i)),
9696
dtype='float')
9797
return R
9898

0 commit comments

Comments
 (0)