The NumArray is the main object, it can represent a matrix, a vector or a scalar
$matrix = new NumArray(
[
[ 1/7, 6, -1.34],
[ 2, 3.1, -2/3],
[-4/9, 2.65, 1],
]
);
$vector = new NumArray(
[0.12, 6/7, -9]
);
The basic operations get and set are inspired by the simplicity of MATLAB
$matrix->get('1:3', 5);
$matrix->set(3, '1:', $vector);
There are all basic operations for matrices and vectors: add, sub, dot, min, max, abs, getShape, getSize and many more
$matrix1->dot($matrix2);
Many known functions from the linear algebra: det, lud, inv, cholesky and more
$det = LinAlg::det($matrix);
$inv = LinAlg::inv($matrix);