Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 5th No.33】为 Paddle 新增 atleast_1d / atleast_2d / atleast_3d API -part #58323

Merged
merged 12 commits into from
Nov 16, 2023
Merged
Prev Previous commit
Next Next commit
[Fix] import atleast
megemini committed Oct 23, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 23959773b11ebd85bc21b07d4e55b40e537d8dca
3 changes: 3 additions & 0 deletions python/paddle/__init__.py
Original file line number Diff line number Diff line change
@@ -830,6 +830,9 @@
'logspace',
'reshape',
'reshape_',
'atleast_1d',
'atleast_2d',
'atleast_3d',
'reverse',
'nonzero',
'CUDAPinnedPlace',
6 changes: 3 additions & 3 deletions python/paddle/tensor/__init__.py
Original file line number Diff line number Diff line change
@@ -111,9 +111,9 @@
from .logic import isclose # noqa: F401
from .logic import equal_all # noqa: F401
from .logic import is_tensor # noqa: F401
from .manupulation import atleast_1d # noqa: F401
from .manupulation import atleast_2d # noqa: F401
from .manupulation import atleast_3d # noqa: F401
from .manipulation import atleast_1d # noqa: F401
from .manipulation import atleast_2d # noqa: F401
from .manipulation import atleast_3d # noqa: F401
Comment on lines +115 to +117
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we need to support the usage of x.atleast_1d(), x.atleast_2d(), x.atleast_3d() when x is a tensor ? If so, add them to the list of tensor_method_func below

from .manipulation import cast # noqa: F401
from .manipulation import cast_ # noqa: F401
from .manipulation import concat # noqa: F401