Skip to content

Commit d7a9ecb

Browse files
committed
Fix hfft downcasting logic
1 parent 0b6ddcd commit d7a9ecb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_compat/common/_fft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def hfft(
132132
) -> ndarray:
133133
res = xp.fft.hfft(x, n=n, axis=axis, norm=norm)
134134
if x.dtype in [xp.float32, xp.complex64]:
135-
return res.astype(xp.complex64)
135+
return res.astype(xp.float32)
136136
return res
137137

138138
def ihfft(

0 commit comments

Comments
 (0)