Skip to content

Use operator.index to convert indices to Python int#5582

Merged
colesbury merged 1 commit intopytorch:masterfrom
colesbury:nn_index
Mar 6, 2018
Merged

Use operator.index to convert indices to Python int#5582
colesbury merged 1 commit intopytorch:masterfrom
colesbury:nn_index

Conversation

@colesbury
Copy link
Copy Markdown
Member

This makes ParameterList, ModuleList, and Sequential convert PyTorch and
NumPy scalars to integers. This matches the behavior of Python lists

cc @adamlerer

This makes ParameterList, ModuleList, and Sequential convert PyTorch and
NumPy scalars to integers. This matches the behavior of Python lists.
@colesbury colesbury merged commit 82bdc51 into pytorch:master Mar 6, 2018
@colesbury colesbury deleted the nn_index branch March 6, 2018 17:41
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
This makes ParameterList, ModuleList, and Sequential convert PyTorch and
NumPy scalars to integers. This matches the behavior of Python lists.
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.

2 participants