-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for IndexError in an expression list assignment (#408)
There are some cases where the left and right hand sides of the assignment don't have equal number of arguments. This change ensures the node children have identical sizes to avoid this condition. A longer term solution might be to handle star arguments. Fixes #407 Signed-off-by: Eric Brown <eric.brown@securesauce.dev>
- Loading branch information
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import torch | ||
|
||
|
||
torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
x = torch.tensor([[0.1, 1.2], [2.2, 3.1], [4.9, 5.2]]) | ||
b, *_, device = *x.shape, x.device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters