Skip to content

Commit

Permalink
make torch_ppc a torch jit script function
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed May 7, 2024
1 parent f0671e7 commit 1ffcc22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bnpm/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,7 @@ def ppc(phases, axis=None):
return ((cosSum**2 + sinSum**2) - N) / (N * (N - 1))


@torch.jit.script
def torch_ppc(phases: torch.Tensor, axis: Optional[List[int]] = None):
"""
Exactly the same as ``ppc`` but works with torch.jit.script.
Expand Down

0 comments on commit 1ffcc22

Please sign in to comment.