-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
support numpy dtype and polish code of list index. #35404
Conversation
Thanks for your contribution! |
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* support numpy dtype and polish code of list index. * polish code.
PR types
Bug fixes
PR changes
APIs
Describe
varbase._getitem__
支持 np.longlong,np.int64,np.int32 ,np.int16