Circular buffers (aka ring buffers) backed by a numpy array, supporting the operations:
b.append(val)
b.appendleft(val)
b.pop(val)
b.popleft(val)
np.array(b) - fast unwrapping into a numpy array, for vectorization
For example:
import numpy as np
from numpy_ringbuffer import RingBuffer
r = RingBuffer(capacity=4, dtype=np.bool)
r.append(True)
r.appendleft(False)
print(np.array(r)) # array([False, True])
Metadata
Release files for numpy-ringbuffer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| numpy_ringbuffer-0.1.1.zip | 3.5 kB | Details |
Release files / numpy_ringbuffer-0.1.1.zip
| Download URL | numpy_ringbuffer-0.1.1.zip |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9523368eae3a0d8439da9bdd634f50bfbabde21fc2174e04d4d735064fa87a4
|
|
BLAKE2b-256 checksum How to use checksums |
2f58a06127a1c6b9f090f309aea6c5cf85f3bb45a4ca6cf1c000b509029684e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |