DataFrame<R, C>.ToMatrix<T> Method

Converts the data frame to a matrix with elements of the specified type.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public virtual Matrix<T> ToMatrix<T>(
	bool skipMismatchedColumns = true,
	bool strict = false
)

Parameters

skipMismatchedColumns  Boolean  (Optional)
If true, omits columns that cannot be converted to T.
strict  Boolean  (Optional)
When skipping mismatched columns, includes only columns whose element type is exactly T.

Type Parameters

T
The element type of the matrix.

Return Value

Matrix<T>
A matrix

Exceptions

InvalidCastException

The element type of one or more columns cannot be converted to T.

See Also