Skip to content

Commit bafb572

Browse files
authored
fix dtype (#76623)
1 parent 53794aa commit bafb572

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

python/paddle/audio/functional/window.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def hamming_window(
507507
alpha: float = 0.54,
508508
beta: float = 0.46,
509509
*,
510-
dtype: str = 'float64',
510+
dtype: str = 'float32',
511511
layout: str | None = None,
512512
device: PlaceLike | None = None,
513513
pin_memory: bool = False,
@@ -521,7 +521,7 @@ def hamming_window(
521521
periodic (bool, optional): If True, returns a window for use as a periodic function; if False, returns a symmetric window. Defaults to True.
522522
alpha (float, optional): The coefficient α in the equation above. Defaults to 0.54.
523523
beta (float, optional): The coefficient β in the equation above. Defaults to 0.46.
524-
dtype (str, optional): The data type of the returned tensor. Defaults to 'float64'.
524+
dtype (str, optional): The data type of the returned tensor. Defaults to 'float32'.
525525
layout (str, optional): Only included for API consistency with PyTorch; ignored in Paddle. Defaults to None.
526526
device(PlaceLike|None, optional): The desired device of returned tensor.
527527
if None, uses the current device for the default tensor type (see paddle.device.set_device()).
@@ -558,7 +558,7 @@ def hann_window(
558558
window_length: int,
559559
periodic: bool = True,
560560
*,
561-
dtype: str = 'float64',
561+
dtype: str = 'float32',
562562
layout: str | None = None,
563563
device: PlaceLike | None = None,
564564
pin_memory: bool = False,
@@ -570,7 +570,7 @@ def hann_window(
570570
Args:
571571
window_length (int): The size of the returned window. Must be positive.
572572
periodic (bool, optional): If True, returns a window for use as a periodic function; if False, returns a symmetric window. Defaults to True.
573-
dtype (str, optional): The data type of the returned tensor. Defaults to 'float64'.
573+
dtype (str, optional): The data type of the returned tensor. Defaults to 'float32'.
574574
layout (str, optional): Only included for API consistency with PyTorch; ignored in Paddle. Defaults to None.
575575
device(PlaceLike|None, optional): The desired device of returned tensor.
576576
if None, uses the current device for the default tensor type (see paddle.device.set_device()).
@@ -604,7 +604,7 @@ def kaiser_window(
604604
periodic: bool = True,
605605
beta: float = 12.0,
606606
*,
607-
dtype: str = 'float64',
607+
dtype: str = 'float32',
608608
layout: str | None = None,
609609
device: PlaceLike | None = None,
610610
pin_memory: bool = False,
@@ -617,7 +617,7 @@ def kaiser_window(
617617
window_length (int): The size of the returned window. Must be positive.
618618
periodic (bool, optional): If True, returns a window for use as a periodic function; if False, returns a symmetric window. Defaults to True.
619619
beta (float, optional): Shape parameter for the window. Defaults to 12.0.
620-
dtype (str, optional): The data type of the returned tensor. Defaults to 'float64'.
620+
dtype (str, optional): The data type of the returned tensor. Defaults to 'float32'.
621621
layout (str, optional): Only included for API consistency with PyTorch; ignored in Paddle. Defaults to None.
622622
device(PlaceLike|None, optional): The desired device of returned tensor.
623623
if None, uses the current device for the default tensor type (see paddle.device.set_device()).
@@ -652,7 +652,7 @@ def blackman_window(
652652
window_length: int,
653653
periodic: bool = True,
654654
*,
655-
dtype: str = 'float64',
655+
dtype: str = 'float32',
656656
layout: str | None = None,
657657
device: PlaceLike | None = None,
658658
pin_memory: bool = False,
@@ -664,7 +664,7 @@ def blackman_window(
664664
Args:
665665
window_length (int): The size of the returned window. Must be positive.
666666
periodic (bool, optional): If True, returns a window for use as a periodic function; if False, returns a symmetric window. Defaults to True.
667-
dtype (str, optional): The data type of the returned tensor. Defaults to 'float64'.
667+
dtype (str, optional): The data type of the returned tensor. Defaults to 'float32'.
668668
layout (str, optional): Only included for API consistency with PyTorch; ignored in Paddle. Defaults to None.
669669
device(PlaceLike|None, optional): The desired device of returned tensor.
670670
if None, uses the current device for the default tensor type (see paddle.device.set_device()).
@@ -697,7 +697,7 @@ def bartlett_window(
697697
window_length: int,
698698
periodic: bool = True,
699699
*,
700-
dtype: str = 'float64',
700+
dtype: str = 'float32',
701701
layout: str | None = None,
702702
device: PlaceLike | None = None,
703703
pin_memory: bool = False,
@@ -709,7 +709,7 @@ def bartlett_window(
709709
Args:
710710
window_length (int): The size of the returned window. Must be positive.
711711
periodic (bool, optional): If True, returns a window for use as a periodic function; if False, returns a symmetric window. Defaults to True.
712-
dtype (str, optional): The data type of the returned tensor. Defaults to 'float64'.
712+
dtype (str, optional): The data type of the returned tensor. Defaults to 'float32'.
713713
layout (str, optional): Only included for API consistency with PyTorch; ignored in Paddle. Defaults to None.
714714
device(PlaceLike|None, optional): The desired device of returned tensor.
715715
if None, uses the current device for the default tensor type (see paddle.device.set_device()).

0 commit comments

Comments
 (0)