Skip to main content

cyarray: a typed, re-sizable Cython array

CI Status Documentation Status

The cyarray package provides a fast, typed, re-sizable, Cython array.

It currently provides the following arrays: IntArray, UIntArray, LongArray, FloatArray, DoubleArray.

All arrays provide for the following operations:

  • access by indexing.

  • access through get/set function.

  • resizing the array.

  • appending values at the end of the array.

  • reserving space for future appends.

  • access to internal data through a numpy array.

If you are writing Cython code this is a convenient array to use as it exposes the raw underlying pointer to the data. For example if you use a FloatArray and access its data attribute it will be a float*.

Each array also provides an interface to its data through a numpy array. This is done through the get_npy_array function. The returned numpy array can be used just like any other numpy array but for the following restrictions:

  • the array may not be resized.

  • references of this array should not be kept.

  • slices of this array may not be made.

The numpy array may however be copied and used in any manner.

Installation

cyarray can be installed using pip:

$ pip install cyarray

The package requires Cython, numpy, and mako to be installed and also requires a suitably configured C/C++ compiler.

Usage

In Python one may import and use the package as:

from cyarray.api import IntArray
a = IntArray(10)

Here a is an array of 10 integers.

Metadata

Release files for cyarray 1.2

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

Source distribution (sdist)

Source distribution for cyarray 1.2
File Size Uploaded Provenance
cyarray-1.2.tar.gz 26.3 kB Without provenance Details

Release files / cyarray-1.2.tar.gz

Download URL cyarray-1.2.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e2acc00ddd17ac1e94d89c659ba242c092ef9ad408c5c42ec83077226c9477d5
BLAKE2b-256 checksum
How to use checksums
6453d333386a3be6ee83cc4f3003d87a7fd4a99311a09fe93d17d2eaa979f628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Security for cyarray 1.2

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.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

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