Skip to content

Conversation

@hbwx24
Copy link
Contributor

@hbwx24 hbwx24 commented Sep 2, 2021

PR types

Bug fixes

PR changes

APIs

Describe

  • varbase._getitem__ 支持 np.longlong,np.int64,np.int32 ,np.int16
  • 修改 list索引的判断条件。动态图这种联合索引仍然走numpy分支
    tensor_x[:, tensor_y1:tensor_y2] = 42

@paddle-bot-old
Copy link

paddle-bot-old bot commented Sep 2, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Comment on lines 591 to 598
if not isinstance(item, (tuple, list)):
item = [item]

for slice_item in item:
if isinstance(slice_item, list):
if isinstance(slice_item, (list, tuple)):
return True
elif isinstance(slice_item, Variable):
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

when item is a list, the return is False

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, thx.

Copy link
Contributor

@zyfncg zyfncg 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

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

@hbwx24 hbwx24 merged commit 60c5ada into PaddlePaddle:develop Sep 6, 2021
AnnaTrainingG pushed a commit to AnnaTrainingG/Paddle that referenced this pull request Sep 29, 2021
* support numpy dtype and polish code of list index.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants