This release is a pre-release and may not be stable for production use.
Sitta
A lightweight, dynamic multi-dimensional array / view for C++20. Pure container: shape, strides, memory ownership and zero-copy views, nothing else. Optional, opt-in interop with xtensor, Kokkos, HDF5, TBB, Boost.MultiArray, and Python.
#include <sitta/sitta.hpp>
using namespace sitta;
Installation
Header-only with zero dependencies for the core functionality.
cmake -B build
cmake --build build
ctest --test-dir build
Interop features (xtensor, Kokkos, HDF5, TBB, Boost.MultiArray, Python) are auto-detected
and built only if their dependencies are found; pass -DSITTA_ENABLE_<NAME>=OFF to skip one
even when present.
Usage example
Two flavors: static rank (SittaArray<T, N>, rank known at compile time, tightest
codegen) and dynamic rank (SittaArray<T>, rank known at runtime). Both share the
same API.
// Owning allocation, static rank 2.
auto a = SittaArray<double, 2>::from_shape({3, 4});
a(1, 2) = 3.14;
// Views share the buffer (refcounted): no copy, no allocation.
auto t = a.transpose(); // shape (4, 3)
auto s = a.slice(std::array<Range,2>{Range{0, 2, 1}, Range{1, 3, 1}});
s(0, 0) = 42; // writes through to `a`
// Wrap external memory without taking ownership.
std::vector<float> buf(6);
auto w = SittaArray<float, 2>::wrap(buf.data(), {2, 3});
See the Getting Started guide for the full walkthrough:
element access, reshape/squeeze, the rank-reducing drop_axis/subview,
static/dynamic rank conversion, inspecting an array,
and the element-wise for_each/transform algorithms.
Interop
- xtensor: zero-copy view for host math (
sitta::xt_interop::as_xtensor) - Kokkos: wraps a
Kokkos::View's refcount for host/device buffers - HDF5: read/write full datasets or hyperslabs, including user structs
- TBB: parallel
for_each/transform - Boost.MultiArray: zero-copy or copying conversion, static rank only
- Python: nanobind module with NumPy and DLPack zero-copy interop
Full usage for each adapter is in docs/interop.rst.
What this class is not
No arithmetic, no broadcasting, no iterators, no I/O beyond the HDF5 adapter, no automatic host/device mirroring. It's a metadata + buffer-lifetime layer: build numeric operations on top via the xtensor/Kokkos/Python adapters.
Documentation
Full API reference (generated from source via clang-doc) and detailed guides build with Sphinx:
cmake -B build -DSITTA_ENABLE_DOCS=ON
cmake --build build --target docs
See docs/README.md for the doc-build pipeline, or browse the .rst
sources directly: docs/getting_started.rst,
docs/interop.rst.
License
MIT. See LICENSE.
Metadata
Release files for sitta 2.0.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sitta-2.0.0rc2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
Release files / sitta-2.0.0rc2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | sitta-2.0.0rc2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 233.0 kB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1f871a00a3c69448e80be3d55521ced34bf377f027220e5aaf2721f2a004bada
|
|
BLAKE2b-256 checksum How to use checksums |
a148fefc81fa7809de38e4ddab5f4752afcb54e973a84e72e07aad0c5516a797
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for sitta 2.0.0rc2
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.