Documentation
¶
Overview ¶
Package gonum exports Cosma DataFrames and Series to Gonum matrices and vectors.
All exported functions require numeric columns (int8–int64, uint8–uint64, float32, float64). Non-numeric columns are skipped unless explicitly named in MatrixOptions.Cols, in which case a non-numeric column is an error.
Null handling must be chosen explicitly via NullPolicy. There is no silent behavior: the zero value (NullError) returns an error on the first null cell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MatrixOptions ¶
type MatrixOptions struct {
// Cols is the ordered list of column names to include. If empty, all numeric
// columns are included in schema order.
Cols []string
// NullPolicy controls null handling. Defaults to NullError.
NullPolicy NullPolicy
// FillValue is used when NullPolicy == NullFill.
FillValue float64
}
MatrixOptions configures ToMatrix.
type NullPolicy ¶
type NullPolicy int
NullPolicy controls how null cells are handled during conversion.
const ( NullError NullPolicy = iota // return error on first null cell (default) NullDrop // drop entire row if any selected column is null NullFill // replace null cells with FillValue )
type VectorOptions ¶
type VectorOptions struct {
NullPolicy NullPolicy
FillValue float64
}
VectorOptions configures ToVector.
Click to show internal directories.
Click to hide internal directories.