Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions torch_crps/analytical/studentt.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def standardized_studentt_cdf_via_scipy(
"Install `torch-crps` with the 'studentt' dependency group, e.g. `pip install torch-crps[studentt]`."
) from e

z_np = z.detach().cpu().numpy()
nu_np = nu.detach().cpu().numpy() if isinstance(nu, torch.Tensor) else nu
z_np = z.detach().float().cpu().numpy() # float() handles bfloat16
nu_np = nu.detach().float().cpu().numpy() if isinstance(nu, torch.Tensor) else nu # float() handles bfloat16

cdf_z_np = scipy_student_t.cdf(x=z_np, df=nu_np)

Expand Down
Loading