Skip to content

triu() argument names for Variable does not match that for Tensors #1839

@yusufziyaisik

Description

@yusufziyaisik

If a is a Tensor, then a.triu(k=1) will get the upper triangular part above the first diagonal. But if a is a Variable, I got the below error:

TypeError: triu() got an unexpected keyword argument 'k'

It seems that for Variables. the appropriate argument name is diagonal_idx .

It would be nice if both have the same argument names.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions