matrix into-nu

For conversions.

Convert a matrix to a nushell table (list of lists by default).

Command Type

built-in

Signature

> matrix into-nu {flags}

Flags

  • --as-records, -r: Output as a list of records with auto-generated column names

Input/output types:

input output
matrix table

Examples

Convert an identity matrix to a nushell table

> matrix identity 2 | matrix into-nu | to nuon
[[1.0, 0.0], [0.0, 1.0]]

Convert a matrix to records

> matrix identity 2 | matrix into-nu --as-records | to nuon
[["col0", "col1"]; [1.0, 0.0], [0.0, 1.0]]

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.