numpy_ringbuffer icon indicating copy to clipboard operation
numpy_ringbuffer copied to clipboard

Fix extend-with-overflow

Open charlesbmi opened this issue 2 years ago • 1 comments

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.])>

charlesbmi avatar Apr 11 '23 19:04 charlesbmi

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.

charlesbmi avatar Apr 13 '23 02:04 charlesbmi