numpy_ringbuffer
numpy_ringbuffer copied to clipboard
Fix extend-with-overflow
Previous behavior:
>>> import numpy as np
>>> from numpy_ringbuffer import RingBuffer
>>> r = RingBuffer(5)
>>> r.extend(np.arange(8))
>>> r
<RingBuffer of array([], dtype=float64)>
Expected/fixed behavior:
>>> import numpy as np
>>> from numpy_ringbuffer import RingBuffer
>>> r = RingBuffer(5)
>>> r.extend(np.arange(8))
>>> r
<RingBuffer of array([3., 4., 5., 6., 7.])>
You're welcome! I added a separate PR that I think might fix the workflow: https://github.com/eric-wieser/numpy_ringbuffer/pull/19 , although I could only test it locally.