(rontolisp) docs
← linalg Package Functions

linalg:from-list

(linalg:from-list list &key element-type)

Converts a list into a linalg array: a flat list becomes a rank-1 vector, and a list of equal-length row lists becomes a rank-2 matrix. This is the usual way to write array literals in linalg code. The inverse conversion is linalg:to-list. Double-float by default; pass :element-type 'single-float for a packed single-float (#f) result. :element-type 'bfloat16 builds a packed bfloat16 (#bf16) array instead, on the interpreter and the JVM only (Single-float precision).