It combines NumPy-friendly buffers with native mixed-precision kernels, zero-copy tensor views, packed and symmetric matrix operations, sparse helpers, many-to-many shape distances, and MaxSim.
The API feels NumPy-shaped with familiar scalar, batched, and all-pairs entrypoints, while Tensor keeps shape, dtype, and strides visible through a memoryview-backed container.
Low-precision dtypes (BFloat16, Float8, Float6, packed bits) flow through the same API, and dense, packed, and symmetric kernels release the GIL around native work.
Topics
| Installation | |
|---|---|
| Quickstart | |
| Highlights | |
| Scalar Types6 | NumKong exposes two different low-precision stories in Python. |
| Tensors and Views65 | Tensor is a memoryview-backed object with NumPy-like metadata. |
| Dot Products3 | Dot products are their own family because storage type, conjugation rules, and output widening matter. |
| Dense Distances4 | The dense distance entrypoints cover sqeuclidean, euclidean, and angular. |
| Set Similarity2 | Packed-binary metrics operate on packed bits. |
| Probability Metrics5 | Probability divergences deserve their own section because they are not just "one more distance". |
| Geospatial Metrics16 | Geospatial kernels score every row point against every column point into a [rows, columns] matrix. |
| Curved Metrics2 | Curved-space kernels use an extra metric tensor or inverse covariance and should not be mixed into the Euclidean section. |
| Elementwise and Reductions19 | Elementwise arithmetic and fused operations are their own family. |
| Sparse Operations2 | Sparse helpers cover both sorted-index intersections and weighted sparse dot products. |
| Matrix Kernels33 | Packed matrix kernels are the right tool when the right-hand side is reused across many query batches. |
| MaxSim11 | MaxSim is the late-interaction primitive used by systems such as ColBERT. |
| Mesh Alignment27 | Point clouds are packed once each, centered on their centroids and rotated onto their principal axes. |
| Runtime Dispatch24 | |
| Parallelism | |
| External Memory | NumKong implements the Python buffer protocol for zero-copy interop with NumPy, PyTorch, and other buffer-aware libraries. |