TensorIndex returns the tensor SubSpace for given column, 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 if column is a 1-dimensional tensor or there is any error from the
(column, row int)
| 508 | // being the row number. Returns nil if column is a 1-dimensional |
| 509 | // tensor or there is any error from the tensor.Tensor.SubSpace call. |
| 510 | func (dt *Table) TensorIndex(column, row int) tensor.Tensor { |
| 511 | if !dt.IsValidRow(row) { |
| 512 | return nil |
| 513 | } |
| 514 | ct := dt.Columns[column] |
| 515 | if ct.NumDims() == 1 { |
| 516 | return nil |
| 517 | } |
| 518 | return ct.SubSpace([]int{row}) |
| 519 | } |
| 520 | |
| 521 | // Tensor returns the tensor SubSpace for given column (by name), row index |
| 522 | // for columns that have higher-dimensional tensors so each row is |
no test coverage detected