Open YodaEmbedding opened 1 year ago
Thanks @YodaEmbedding.
For reference, here is comparison between current behavior for ListConfig
and for python's built-in list
type:
>>> [][:-1]
[]
>>> OmegaConf.create([])[:-1]
Traceback (most recent call last): ... ValueError: ...
A PR to fix this would be welcome. It would probably involve a minor edit to the ListConfig.__getitem__
method and an extra test or two in the test_basic_ops_list.py
file.
Describe the bug ListConfig errors when is [:-1] applied to empty list.
To Reproduce
Expected behavior
Additional context