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)
| 442 | // for columns that have 1-dimensional tensors. |
| 443 | // Returns NaN if column is not a 1-dimensional tensor or row not valid. |
| 444 | func (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. |
no test coverage detected