Skip to content

Commit

Permalink
inline lmax conditional suggested by @awf
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Fitzgibbon <[email protected]>
  • Loading branch information
hatemhelal and awf authored Sep 18, 2023
1 parent 61ab778 commit 3afef1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyscf_ipu/experimental/integrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def lmax(i: int, j: int, k: int):
for idx in range(n):
for jdx in range(idx + 1):
for kdx in range(idx + 1):
for ldx in range(lmax(idx, jdx, kdx) + 1):
lmax = jdx if idx == kdx else kdx
for ldx in range(lmax + 1):
yield idx, jdx, kdx, ldx


Expand Down

0 comments on commit 3afef1d

Please sign in to comment.