Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
azrael417 committed Jan 21, 2025
1 parent b4c08e2 commit 5cf8c5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torch_harmonics/legendre.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def clm(l: int, m: int) -> float:
"""
return math.sqrt((2*l + 1) / 4 / math.pi) * math.sqrt(math.factorial(l-m) / math.factorial(l+m))

@cache
def legpoly(mmax: int, lmax: int, x: torch.Tensor, norm: Optional[str]="ortho", inverse: Optional[bool]=False, csphase: Optional[bool]=True) -> torch.Tensor:
r"""
Computes the values of (-1)^m c^l_m P^l_m(x) at the positions specified by x.
Expand Down Expand Up @@ -91,6 +90,7 @@ def legpoly(mmax: int, lmax: int, x: torch.Tensor, norm: Optional[str]="ortho",

return vdm

@cache
def _precompute_legpoly(mmax: int , lmax: int, t: torch.Tensor,
norm: Optional[str]="ortho", inverse: Optional[bool]=False, csphase: Optional[bool]=True) -> torch.Tensor:
r"""
Expand All @@ -107,6 +107,7 @@ def _precompute_legpoly(mmax: int , lmax: int, t: torch.Tensor,

return legpoly(mmax, lmax, torch.cos(t), norm=norm, inverse=inverse, csphase=csphase)

@cache
def _precompute_dlegpoly(mmax: int, lmax: int, t: torch.Tensor,
norm: Optional[str]="ortho", inverse: Optional[bool]=False, csphase: Optional[bool]=True) -> torch.Tensor:
r"""
Expand Down

0 comments on commit 5cf8c5c

Please sign in to comment.