We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d53b143 commit 60fd6c7Copy full SHA for 60fd6c7
1 file changed
transformcl.py
@@ -138,7 +138,9 @@ def var(cl):
138
139
"""
140
xp = array_namespace(cl)
141
- ell = xp.arange(cl.shape[-1])
+ # ell cannot be an integer here as, within the array api
142
+ # only floating-point dtypes are allowed in __truediv__
143
+ ell = xp.arange(cl.shape[-1], dtype=xp.float64)
144
return xp.sum((2 * ell + 1) / (4 * xp.pi) * cl, axis=-1)
145
146
0 commit comments