Math Module

The spine.math module provides the Numba-accelerated numerical kernels and geometry helpers used internally across SPINE. These routines support clustering, neighborhood queries, distance calculations, decomposition, and graph-style operations that appear throughout reconstruction and analysis.

Fast, Numba-accelerated math routines.

This includes multiple submodules: - base.py includes basic functions, as found in numpy or scipy.special - linalg.py includes linear algebra routines, as found in numpy.linalg - distance.py includes distance functions, as found in scipy.distance - graph.py includes graph routines, as found in scipy.csgraph - cluster.py includes cluster functions, as found in sklearn.cluster - metrics.py includes clustering evaluation metrics

Core Modules

This package is an implementation layer for the reconstruction stack, not the main user-facing entry point of SPINE. It is documented here because many higher-level modules depend on it.

base

Numba JIT compiled implementation of basic functions.

cluster

Numba JIT compiled implementation of clustering routines.

decomposition

Numba JIT compiled implementation of decomposition routines.

distance

Numba JIT compiled implementation of distance computation routines.

graph

Numba JIT compiled implementation of graph routines.

linalg

Numba JIT compiled implementation of linear algebra routines.

metrics

Numba JIT compiled implementation of clustering evaluation metrics.

neighbors

Numba JIT compiled implementation of neighbor query routines.