Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add RangeVariable, EnumerateVariable #222

Closed
wants to merge 16 commits into from

Conversation

NotHaozi
Copy link
Collaborator

@NotHaozi NotHaozi commented Jun 29, 2023

  1. 添加了 RangeVariable
  2. 添加了 EnumerateVariable
    注意:
    现在不支持 range里面是个tensor的一个值
# TODO(zmh): support range for tensor
def test_enumerate_5(x: paddle.Tensor):
    sum = 0

    for idx, val in enumerate(x):
        for i in range(val):
            sum += val
    return sum

@paddle-bot
Copy link

paddle-bot bot commented Jun 29, 2023

Thanks for your contribution!

@NotHaozi NotHaozi changed the title Add RangeVariable and dict, list, tuple Add RangeVariable, EnumerateVariable Jun 30, 2023
@@ -158,5 +158,4 @@ def test_list_comp(self):


if __name__ == "__main__":
with strict_mode_guard(0 if sys.version_info >= (3, 10) else 1):
unittest.main()
unittest.main()
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
Collaborator Author

Choose a reason for hiding this comment

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

宁说的对🤺

@SigureMo
Copy link
Member

已在 #256 merge

@SigureMo SigureMo closed this Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants