Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ops/numpy.py: support key as list in GetItem
When loading a model that contains GetItem nodes with multidimensional indices/slices as key, the key argument is loaded from JSON as a list, not a tuple (because JSON does not have the distinction). So, treat the key list as equivalent to the key tuple. Copying is important, otherwise, the later pop() will remove the bound slice elements.
- Loading branch information
7e8532e
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.
Please take a look, I had trouble loading a model that did things like this: