Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Difers
Copy link
Contributor

@Difers Difers commented Aug 6, 2025

PR Category

User Experience

PR Types

New features

Description

Pcard-73145
增加paddle.ravel API

@paddle-bot
Copy link

paddle-bot bot commented Aug 6, 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.

@Difers Difers changed the title [PaCovert]add paddle.ravel [API compatibility]add paddle.ravel Aug 6, 2025
@zhwesky2010 zhwesky2010 changed the title [API compatibility]add paddle.ravel [API compatibility] add paddle.ravel Aug 6, 2025
self.data_np = np.array([[1, 2, 3], [4, 5, 6]], dtype='float32')
self.data_flat = self.data_np.ravel()

def test_case_1(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

反向case也测两个吧

self.data_flat = self.data_np.ravel()

def test_case_1(self):
paddle_code = textwrap.dedent(
Copy link
Contributor

Choose a reason for hiding this comment

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

这个paddle_code的作用是?应该不用这么写吧


def test_case_1(self):
paddle_code = textwrap.dedent(
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

静态图case也测两个吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done,已更新~

@codecov-commenter
Copy link

codecov-commenter commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@4614b93). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #74439   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         2           
  Branches           ?         0           
===========================================
  Hits               ?         2           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

zhwesky2010
zhwesky2010 previously approved these changes Aug 7, 2025
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

class TestPaddleRavel_case3(TestPaddleRavel):
def setUp(self):
# check Ravel 0d (scalar)
self.input_np = np.array(5.0, dtype="float32") # 标量
Copy link
Member

Choose a reason for hiding this comment

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

用英文

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改~

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

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 1178ff0 into PaddlePaddle:develop Aug 8, 2025
72 of 73 checks passed
Enigmatisms pushed a commit to Enigmatisms/Paddle that referenced this pull request Aug 9, 2025
* add paddle.ravel

* fix test case

* fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants