Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extend-with-overflow #18

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

charlesbmi
Copy link

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

Copy link
Owner

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this! Unfortunately CI seems to be failing, but that might be because I've not looked at this project for years.

@charlesbmi
Copy link
Author

You're welcome! I added a separate PR that I think might fix the workflow: #19 , although I could only test it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants