mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 10:01:50 +08:00
[rllib] arr[end] was excluded when end is not None (#1931)
Looks good, thanks!
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user