-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
history: Fix regressions in __getitem__ (#776)
* Index epochs first so IndexError is always raised for bad epoch indices, and so jagged batch counts don't raise a false IndexError. * Only filter epochs with non-matching keys once, and do it after indexing epochs to avoid returning values from the wrong epoch(s). * Never compare arbitrary values to empty lists or tuples - instead, generate _none if no batches matched the keys to exclude the epoch. * Don't raise KeyError if all batches are requested but there are no epochs - an empty list is probably more useful. * Add new history tests
- Loading branch information
1 parent
1d37ef3
commit 54796f1
Showing
3 changed files
with
151 additions
and
61 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
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