Skip to content

Commit 2eeb8d9

Browse files
authored
[Typing][B-69] Add type annotations for python/paddle/sparse/multiary.py (#65867)
1 parent 4f98391 commit 2eeb8d9

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

python/paddle/sparse/multiary.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,28 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
from __future__ import annotations
16+
17+
from typing import TYPE_CHECKING
18+
1519
from paddle import _C_ops
1620
from paddle.base.framework import dygraph_only
1721

22+
if TYPE_CHECKING:
23+
from paddle import Tensor
24+
1825
__all__ = []
1926

2027

2128
@dygraph_only
22-
def addmm(input, x, y, beta=1.0, alpha=1.0, name=None):
29+
def addmm(
30+
input: Tensor,
31+
x: Tensor,
32+
y: Tensor,
33+
beta: float = 1.0,
34+
alpha: float = 1.0,
35+
name: str | None = None,
36+
) -> Tensor:
2337
"""
2438
Note:
2539
This API is only supported from ``CUDA 11.0`` .

0 commit comments

Comments
 (0)