matrix
For filters.
Various commands for working with matrices.
Command Type
built-in
Signature
> matrix {flags}
Input/output types:
| input | output |
|---|---|
| nothing | string |
Notes
You must use one of the following subcommands. Using this command as-is will only produce this help message.
Subcommands:
| name | description | type |
|---|---|---|
matrix add |
Add a matrix or scalar to a matrix. | built-in |
matrix get-col |
Extract a column from a 2D matrix. | built-in |
matrix get-row |
Extract a row from a matrix. | built-in |
matrix identity |
Create an identity matrix of the given size. | built-in |
matrix into-nu |
Convert a matrix to a nushell table (list of lists by default). | built-in |
matrix map |
Apply a closure to each element of a matrix and return a new matrix. | built-in |
matrix max |
Find the maximum value in a matrix, or max along an axis. | built-in |
matrix mean |
Compute the mean of all elements in a matrix. | built-in |
matrix multiply |
Multiply two matrices using dot product. | built-in |
matrix reduce |
Reduce all elements of a matrix to a single value. | built-in |
matrix reshape |
Change the dimensions of a matrix. | built-in |
matrix scale |
Multiply all elements of a matrix by a scalar. | built-in |
matrix set-col |
Replace a column in a 2D matrix. | built-in |
matrix set-row |
Replace a row in a matrix. | built-in |
matrix subtract |
Subtract a matrix or scalar from a matrix. | built-in |
matrix sum |
Sum all elements of a matrix, or sum along an axis. | built-in |
matrix transpose |
Transpose a matrix (swap rows and columns). For n-dimensional arrays, reverses all axes. | built-in |
matrix zeros |
Create a matrix filled with zeros. | built-in |
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.