Data Frame.From Matrix Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
From | Constructs a new data frame from a matrix with a default row index. |
From | Constructs a new data frame from a matrix. |
FromMatrix<C, T>(Matrix<T>, Index<C>)
Constructs a new data frame from a matrix with a default row index.
public static DataFrame<long, C> FromMatrix<C, T>(
Matrix<T> values,
Index<C> columnIndex
)
Parameters
Type Parameters
- C
- The element type of columnIndex.
- T
- The element type of the matrix.
Return Value
DataFrame<Int64, C>A data frame containing the columns of values as its columns.
Exceptions
Argument | values is null. -or- columnIndex is null. |
Dimension | The length of columnIndex does not equal the number of columns in values. |
FromMatrix<R, C, T>(Matrix<T>, Index<R>, Index<C>)
Constructs a new data frame from a matrix.
public static DataFrame<R, C> FromMatrix<R, C, T>(
Matrix<T> values,
Index<R> rowIndex,
Index<C> columnIndex
)
Parameters
- values Matrix<T>
- A matrix.
- rowIndex Index<R>
- The row index of the new data frame.
- columnIndex Index<C>
- The column index of the new data frame.
Type Parameters
- R
- The element type of rowIndex.
- C
- The element type of columnIndex.
- T
- The element type of the matrix.
Return Value
DataFrame<R, C>A data frame containing the columns of values as its columns.
Exceptions
Argument | values is null. -or- rowIndex is null. -or- columnIndex is null. |
Dimension | The length of rowIndex does not equal the number of rows in values. -or- The length of columnIndex does not equal the number of columns in values. |