numpy_ringbuffer icon indicating copy to clipboard operation
numpy_ringbuffer copied to clipboard

indexing an empty buffer doesn't raise an IndexError

Open fpdotmonkey opened this issue 4 years ago • 0 comments

If you index a RingBuffer before having appended any values to it, you will unsafely get whatever was in memory at the buffer's location

from numpy_ringbuffer import RingBuffer
r = RingBuffer(10)
print(r[0])
# -2.6815615859885194e+154

fpdotmonkey avatar Sep 04 '20 00:09 fpdotmonkey