Skip to content

Commit

Permalink
item for diag batched
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Sep 20, 2024
1 parent 582e2b4 commit 27285d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyqtorch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def is_diag_batched(H: Operator, atol: Tensor = ATOL, batch_dim: int = -1) -> bo
[is_diag(H[..., i], atol) for i in range(H.shape[batch_dim])],
device=H.device,
)
return bool(torch.prod(diag_check))
return bool(torch.prod(diag_check).item())
else:
return is_diag(H, atol)

Expand Down

0 comments on commit 27285d0

Please sign in to comment.