Tensor returns the tensor SubSpace for given column (by name), row index for columns that have higher-dimensional tensors so each row is represented by an n-1 dimensional tensor, with the outer dimension being the row number. Returns nil on any error -- see Try version for error returns.
(column string, row int)
| 524 | // being the row number. Returns nil on any error -- see Try version for |
| 525 | // error returns. |
| 526 | func (dt *Table) Tensor(column string, row int) tensor.Tensor { |
| 527 | if !dt.IsValidRow(row) { |
| 528 | return nil |
| 529 | } |
| 530 | ct := dt.ColumnByName(column) |
| 531 | if ct == nil { |
| 532 | return nil |
| 533 | } |
| 534 | if ct.NumDims() == 1 { |
| 535 | return nil |
| 536 | } |
| 537 | return ct.SubSpace([]int{row}) |
| 538 | } |
| 539 | |
| 540 | // TensorFloat1D returns the float value of a Tensor cell's cell at given |
| 541 | // 1D offset within cell, for given column (by name), row index |
nothing calls this directly
no test coverage detected