Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

cuspa: GPU spatial operations for spatial omics

CI

cuspa assigns transcript coordinates to cell polygons and builds sparse cells-by-genes count matrices on the GPU. Geometry is stored in flat GeoArrow-style buffers. GeoPandas and SpatialData inputs are converted before GPU computation.

Installation

Install the prebuilt wheel for your CUDA major version:

[uv] pip install cuspa-cu12  # CUDA 12
[uv] pip install cuspa-cu13  # CUDA 13

Both distributions provide the cuspa Python package; install only one per environment. The optional adapters are extras, for example [uv] pip install "cuspa-cu12[geopandas]"; geoarrow and spatialdata work the same way.

cuspa requires Python 3.12 or newer, a compatible NVIDIA GPU and driver, a CUDA 12 or CUDA 13 runtime, and CuPy or CUDA-enabled PyTorch. Install the CuPy or PyTorch package for your CUDA environment separately. Aggregation and I/O adapters currently require CuPy.

To build from source instead, install the cuspa source distribution. This requires the matching CUDA toolkit and a C++17 compiler:

[uv] pip install cuspa

See the installation guide for wheel targets and source-build details.

Usage

import cuspa as cs

polys = cs.io.from_spatialdata(sdata, "cell_boundaries")
tx = cs.io.transcripts_from_spatialdata(sdata, "transcripts")

csr = cs.tl.aggregate_to_cells(
    [(tx.xy, tx.gene_ids)],
    polys,
    num_genes=len(tx.gene_names),
)

Documentation

See the documentation for installation, usage, geometry input, and the API reference.

Contributing

External contributions are open through pull requests. Report bugs and propose changes through GitHub Issues. See CONTRIBUTING.md for the contribution process. All project participants must follow the Code of Conduct.

Security

Do not report vulnerabilities through public GitHub issues. See SECURITY.md for NVIDIA's private reporting channels.

License

cuspa is licensed under Apache-2.0. See LICENSE.

Metadata

Release files for cuspa 0.1.0rc1

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

Source distribution (sdist)

Source distribution for cuspa 0.1.0rc1
File Size Uploaded Provenance Actions
cuspa-0.1.0rc1.tar.gz 67.4 kB Without provenance Details for cuspa-0.1.0rc1.tar.gz

Release files / cuspa-0.1.0rc1.tar.gz

Download URL cuspa-0.1.0rc1.tar.gz
Size 67.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c1db538a9a7e1d8c49e03d026144289986b1e2bbdecf04b276f7a02f9d4ff98a
BLAKE2b-256 checksum
How to use checksums
1aa7490bba8f86a43000b62a9c035d09ce7cf798f7918f5b3ef6f3edc1775966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for cuspa 0.1.0rc1

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