Skip to content

Commit b9ada92

Browse files
fix for new sympy version
1 parent df847ae commit b9ada92

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

dosrixs/dosrixs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ def build_core_states(edge:EDGE) -> list[YlmExpansion]:
8181
loop = int(j*2)
8282
core_states:list[YlmExpansion] = []
8383
for tmj in [x for x in np.arange(-loop, loop+1, 2) if x != 0]:
84-
mj= 0.5*tmj
84+
mj= float(0.5*tmj)
8585
data = {}
8686
for m in range(-l, l+1):
8787
for spin in [-s, s]:
88+
print(l, m, s, spin, j, mj)
8889
data[(m, spin2idx(spin))] = gaunt_sympy(l, m, s, spin, j, mj)
8990
core_states.append(YlmExpansion(l=l, data=data))
9091
return core_states

dosrixs/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ def gaunt(l1:int=1, l2:int=1, l3:int=2, m1:int=0, m2:int=0, m3:int=0) -> float:
5555
def gaunt_sympy(l1:float, m1:float, l2:float, m2:float, l3:float, m3:float) -> complex:
5656
from sympy.physics.quantum.cg import CG
5757
"""wrapper around sympy.physics.quantum.cg"""
58-
return complex(CG(l1, m1, l2, m2, l3, m3).doit())
58+
return complex(CG(l1, m1, l2, m2, l3, m3).doit())

0 commit comments

Comments
 (0)