Skip to content

Conversation

Qin-sx
Copy link
Contributor

@Qin-sx Qin-sx commented Jun 18, 2025

PR Category

User Experience

PR Types

Improvements

Description

默认值改为None,会自动根据输入判断是否返回一半的频点值。当输入为复数时,不需要每次手动输入onsided=False。

相关pytorch代码:

  const bool complex_fft = input.is_complex();
  const auto onesided = onesidedOpt.value_or(!complex_fft);

Qin-sx added 2 commits June 18, 2025 09:55
	modified:   python/paddle/signal.py
	modified:   python/paddle/signal.py
Copy link

paddle-bot bot commented Jun 18, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Jun 18, 2025
@Qin-sx
Copy link
Contributor Author

Qin-sx commented Jun 18, 2025

pytorch后续会弃用return_complex=False。return_complex默认值为None。

From version 1.8.0, return_complex must always be given explicitly for real inputs and return_complex=False has been deprecated. Strongly prefer return_complex=True as in a future pytorch release, this function will only return complex tensors.

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 17ab92c into PaddlePaddle:develop Jun 19, 2025
47 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants