Skip to content

Commit b9b891c

Browse files
committed
MAINT: signal/windows: f64 degenerate windows, for consistency
1 parent af6235b commit b9b891c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scipy/signal/windows/_windows.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,11 +2121,11 @@ def dpss(M, NW, Kmax=None, sym=True, norm=None, return_ratios=False,
21212121
singleton = False
21222122
if _len_guards(M):
21232123
if not return_ratios:
2124-
return xp.ones(M)
2124+
return xp.ones(M, dtype=xp.float64)
21252125
elif singleton:
2126-
return xp.ones(M), 1.
2126+
return xp.ones(M, dtype=xp.float64), 1.
21272127
else:
2128-
return xp.ones(M), xp.ones(1)
2128+
return xp.ones(M, dtype=xp.float64), xp.ones(1, dtype=xp.float64)
21292129
Kmax = operator.index(Kmax)
21302130
if not 0 < Kmax <= M:
21312131
raise ValueError('Kmax must be greater than 0 and less than M')

0 commit comments

Comments
 (0)