SetNumRows sets the number of rows (outer-most dimension) in a RowMajor organized tensor.
(rows int)
| 105 | |
| 106 | // SetNumRows sets the number of rows (outer-most dimension) in a RowMajor organized tensor. |
| 107 | func (tsr *Bits) SetNumRows(rows int) { |
| 108 | rows = max(1, rows) // must be > 0 |
| 109 | _, cells := tsr.Shp.RowCellSize() |
| 110 | nln := rows * cells |
| 111 | tsr.Shp.Sizes[0] = rows |
| 112 | tsr.Values.SetLen(nln) |
| 113 | } |
| 114 | |
| 115 | // SubSpace is not possible with Bits |
| 116 | func (tsr *Bits) SubSpace(offs []int) Tensor { |
nothing calls this directly
no test coverage detected