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.0
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.0.zip | 3.6 kB | Details |
Release files / numpy_ringbuffer-0.1.0.zip
| Download URL | numpy_ringbuffer-0.1.0.zip |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cb3245eb30d269249fcc9c67a566e59b88fb3c1b8733f127d75db55ea13c0e6
|
|
BLAKE2b-256 checksum How to use checksums |
6460833361d0ce0fc21d1b6b5294ebb546d40da8fcf70244fbb5bce5e91a7eac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |