Spatial tools: tl#

Assign transcripts to cells, find point-polygon overlaps, and aggregate transcripts into a cells-by-genes count matrix on the GPU.

tl.assign_points(points, polygons, *[, ...])

Assign each point to one polygon.

tl.overlap_pairs(points, polygons, *[, ...])

Return all matching (point_idx, polygon_idx) pairs.

tl.aggregate_to_cells(batches, polygons, ...)

Aggregate transcript batches into one GPU-resident (cells × genes) CSR.

tl.CSRMatrix(indptr, indices, data, shape)

CSR matrix backed by CuPy, CUDA PyTorch, or NumPy arrays.