Skip to content
Open
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: 3 additions & 1 deletion transformcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ def var(cl):

"""
xp = array_namespace(cl)
ell = xp.arange(cl.shape[-1])
# ell cannot be an integer here as, within the array api
# only floating-point dtypes are allowed in __truediv__
ell = xp.arange(cl.shape[-1], dtype=xp.float64)
return xp.sum((2 * ell + 1) / (4 * xp.pi) * cl, axis=-1)


Expand Down