mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[rllib] arr[end] was excluded when end is not None (#1931)
Looks good, thanks!
This commit is contained in:
parent
8f59546ef2
commit
baf97e450b
1 changed files with 1 additions and 2 deletions
|
@ -78,10 +78,9 @@ class SegmentTree(object):
|
|||
elements.
|
||||
"""
|
||||
if end is None:
|
||||
end = self._capacity
|
||||
end = self._capacity - 1
|
||||
if end < 0:
|
||||
end += self._capacity
|
||||
end -= 1
|
||||
return self._reduce_helper(start, end, 1, 0, self._capacity - 1)
|
||||
|
||||
def __setitem__(self, idx, val):
|
||||
|
|
Loading…
Add table
Reference in a new issue