Ring (aka circular) buffers backed by a numpy array, supporting:
Operations from collections.deque
b.append(val)
b.appendleft(val)
b.extend(val)
b.extendleft(val)
b.pop(val)
b.popleft(val)
The collections.Sequence protocol (unoptimized)
C-side unwrapping into an array with np.array(b)
Arbitrary element dtypes, including extra dimensions like RingBuffer(N, dtype=(int, 3))
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.2.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.2.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| numpy_ringbuffer-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / numpy_ringbuffer-0.2.1.tar.gz
| Download URL | numpy_ringbuffer-0.2.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac79c60b6d92a688ad152a11d351d9efc2e0749973f71e18a8c9b3b1241a3cef
|
|
BLAKE2b-256 checksum How to use checksums |
938e01693737a7a1b955137b8e45e40fedf155f031f5f824220a6a6ce887baea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / numpy_ringbuffer-0.2.1-py2.py3-none-any.whl
| Download URL | numpy_ringbuffer-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cf92824565258b9d59a6fd39a7b50af08f0733f0b15c819e82eafdf28989b1d6
|
|
BLAKE2b-256 checksum How to use checksums |
efa03f601e7a6c0a8732feca053cf0a756579e7cd2ae362f8497285d6dc1914c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |