SetNumRows sets the number of rows in the table, across all columns if rows = 0 then effective number of rows in tensors is 1, as this dim cannot be 0
(rows int)
| 316 | // SetNumRows sets the number of rows in the table, across all columns |
| 317 | // if rows = 0 then effective number of rows in tensors is 1, as this dim cannot be 0 |
| 318 | func (dt *Table) SetNumRows(rows int) *Table { //types:add |
| 319 | dt.Rows = rows // can be 0 |
| 320 | rows = max(1, rows) |
| 321 | for _, tsr := range dt.Columns { |
| 322 | tsr.SetNumRows(rows) |
| 323 | } |
| 324 | return dt |
| 325 | } |
| 326 | |
| 327 | // note: no really clean definition of CopyFrom -- no point of re-using existing |
| 328 | // table -- just clone it. |