You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need to either: [1] make a note somewhere or [2] add a warning or [3] add a workaround implementation that slicing doesn't exactly work the same way as it does with Python lists or numpy arrays.
[0:None] has undefined behavior
[:] has undefined behavior
[x:-1] has undefined behavior
What does work: providing actual or overshooting indices to characters or words within the stimulus/input.
[1:3, 'char'] works fine and returns surprisal over all tokens overlapping with chars 1:3
[0:99, 'char'] works fine and returns surprisal over all tokens that appear within the first 99 chars
The text was updated successfully, but these errors were encountered:
Need to either: [1] make a note somewhere or [2] add a warning or [3] add a workaround implementation that slicing doesn't exactly work the same way as it does with Python lists or numpy arrays.
[0:None]
has undefined behavior[:]
has undefined behavior[x:-1]
has undefined behaviorWhat does work: providing actual or overshooting indices to characters or words within the stimulus/input.
[1:3, 'char']
works fine and returns surprisal over all tokens overlapping with chars1:3
[0:99, 'char']
works fine and returns surprisal over all tokens that appear within the first 99 charsThe text was updated successfully, but these errors were encountered: