Skip to content
All guides

learn

Grid

Grid is numeric arrays on the metal. That is the NumPy job. The name is Buraaq's.

No guest Python. No BLAS ceremony in application source. zeros(2, 2) is the whole constructor.

fn main() {
    g = zeros(2, 2)
    put_at(g, 0, 0, 1.5)
    println(at(g, 0, 0))
    println(dot(row("1,2,3"), row("4,5,6")))
}
APIWhat it does
zeros / ones / fill / eye / linspace / rowBuild
at / put_at / nrows / ncolsCells
plus / times / scale / matmul / dot / transposeLinear algebra
sum / mean / least / most / normReductions
sin_all / cos_all / viewMap and print

Scalars live in std.math (sin, pow, pi, …). Arrays live here.

Gate B hot loops are ordinary for / while over ints and floats: Grid is for the matrix work those loops become. Measured numbers: performance.

Next: Testing.