numpy_ringbuffer
Ring (aka circular) buffers backed by a numpy array, supporting:
- Operations from
collections.dequeb.append(val)b.appendleft(val)b.extend(val)b.extendleft(val)b.pop(val)b.popleft(val)
- The
collections.Sequenceprotocol (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])
Release files for numpy-ringbuffer 0.2.2
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.2.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| numpy_ringbuffer-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / numpy_ringbuffer-0.2.2.tar.gz
| Download URL | numpy_ringbuffer-0.2.2.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b55e1ff473e3d8807067a3ea42b8d6957f6b6239fc0516527252280edb18fa6
|
|
BLAKE2b-256 checksum How to use checksums |
3a0b08bc9f01677daa58059325e6a1efb18e79c93fbe5d3ffe910349bfbbdea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / numpy_ringbuffer-0.2.2-py3-none-any.whl
| Download URL | numpy_ringbuffer-0.2.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8393d82d0a75b4fce2890674a278c28289bc9e10fe0428c24bc1e1176cfe18d7
|
|
BLAKE2b-256 checksum How to use checksums |
39fd78135ec3fd81fe9ebb44bfc5ae92c2120729008c96fd2be6c2af0dca8126
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|