MCPcopy Create free account
hub / github.com/cogentcore/core / FloatIndex

Method FloatIndex

tensor/table/table.go:444–453  ·  view source on GitHub ↗

Cell convenience access methods FloatIndex returns the float64 value of cell at given column, row index for columns that have 1-dimensional tensors. Returns NaN if column is not a 1-dimensional tensor or row not valid.

(column, row int)

Source from the content-addressed store, hash-verified

442// for columns that have 1-dimensional tensors.
443// Returns NaN if column is not a 1-dimensional tensor or row not valid.
444func (dt *Table) FloatIndex(column, row int) float64 {
445 if !dt.IsValidRow(row) {
446 return math.NaN()
447 }
448 ct := dt.Columns[column]
449 if ct.NumDims() != 1 {
450 return math.NaN()
451 }
452 return ct.Float1D(row)
453}
454
455// Float returns the float64 value of cell at given column (by name), row index
456// for columns that have 1-dimensional tensors.

Callers 1

MakeRowMethod · 0.80

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 3

IsValidRowMethod · 0.95
NumDimsMethod · 0.65
Float1DMethod · 0.65

Tested by

no test coverage detected