Skip to main content

Coverage badge

Introduction

Wrap numpy.ndarray to support fast both-side insertion/deletion and size limit.

  • Fully typed.
  • Directly perform arithmetic operations with NDArray
  • pickleable
  • JSON serializable
pip install ndarraybuffer

Both-side insertion/deletion

arr = ArrayBuffer()
arr.extend(np.arange(100))
arr.append(100)
arr.appendleft(0)
arr.pop(1)
arr.popleft(1)

Size limit

arr = ArrayBuffer(max_len=10)
arr.extend(np.arange(10))
assert len(arr) == 10
assert np.array_equal(arr, np.arange(10))
arr.append(10)
assert len(arr) == 10
assert np.array_equal(arr, np.arange(1, 11))

JSON Serialization and Deserialization

arr = ArrayBuffer(max_len=10, dtype=np.float64)
arr.extend(np.arange(10))
state_dict = arr.state_dict()
rec = ArrayBuffer.load(json.loads(json.dumps(state_dict)))

Metadata

Release files for ndarraybuffer 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ndarraybuffer 0.2.1
File Size Uploaded Provenance Actions
ndarraybuffer-0.2.1.tar.gz 4.2 kB Without provenance Details for ndarraybuffer-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ndarraybuffer 0.2.1
File Interpreter ABI Platform Actions
ndarraybuffer-0.2.1-py3-none-any.whl Python 3 none any Details for ndarraybuffer-0.2.1-py3-none-any.whl

Total release size: 8.5 kB

Release files / ndarraybuffer-0.2.1.tar.gz

Download URL ndarraybuffer-0.2.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d6d9945767b60da946469312283c1d6ea1fb595d7d086aac87a05cea7127fb70
BLAKE2b-256 checksum
How to use checksums
b3bcc8cfd02aa3d3bd406d74fc09b3743b8bcdbf58c4f6b6bad0546718628e9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.6 Darwin/24.0.0

Release files / ndarraybuffer-0.2.1-py3-none-any.whl

Download URL ndarraybuffer-0.2.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f505a1e40a708c3776cf5527f7a32ec647d5d3346cab81d90f7c58263b04a2e3
BLAKE2b-256 checksum
How to use checksums
466b44d5ef87d87b3c90fa6d240a7e75d2a7a939bd2ee62cbc1ed5d0f688e59d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.12.6 Darwin/24.0.0

Security for ndarraybuffer 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page