into matrix for conversions
Convert a nushell table or list of lists into a matrix.
Signature
> into matrix {flags}
Input/output types:
| input | output |
|---|---|
| table | matrix |
| list<list<number>> | matrix |
Examples
Convert a list of lists to a matrix
> [[1 2 3] [4 5 6]] | into matrix | matrix into-nu | to nuon
[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]Convert a list of records to a matrix
> [{a: 1 b: 2} {a: 3 b: 4}] | into matrix | matrix into-nu | to nuon
[[1.0, 2.0], [3.0, 4.0]]