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

Method SetTensor

tensor/table/table.go:654–663  ·  view source on GitHub ↗

SetTensor sets the tensor value of cell at given column (by name), row index for columns that have n-dimensional tensors. Returns true if set.

(column string, row int, val tensor.Tensor)

Source from the content-addressed store, hash-verified

652// SetTensor sets the tensor value of cell at given column (by name), row index
653// for columns that have n-dimensional tensors. Returns true if set.
654func (dt *Table) SetTensor(column string, row int, val tensor.Tensor) bool {
655 if !dt.IsValidRow(row) {
656 return false
657 }
658 ci := dt.ColumnIndex(column)
659 if ci < 0 {
660 return false
661 }
662 return dt.SetTensorIndex(ci, row, val)
663}
664
665// SetTensorFloat1D sets the tensor cell's float cell value at given 1D index within cell,
666// at given column (by name), row index for columns that have n-dimensional tensors.

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 3

IsValidRowMethod · 0.95
ColumnIndexMethod · 0.95
SetTensorIndexMethod · 0.95

Tested by

no test coverage detected