Skip to content

indexing an empty buffer doesn't raise an IndexError #13

@fpdotmonkey

Description

@fpdotmonkey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions