NewBits returns a new n-dimensional tensor of bit values with the given sizes per dimension (shape), and optional dimension names.
(sizes []int, names ...string)
| 27 | // NewBits returns a new n-dimensional tensor of bit values |
| 28 | // with the given sizes per dimension (shape), and optional dimension names. |
| 29 | func NewBits(sizes []int, names ...string) *Bits { |
| 30 | tsr := &Bits{} |
| 31 | tsr.SetShape(sizes, names...) |
| 32 | tsr.Values = bitslice.Make(tsr.Len(), 0) |
| 33 | return tsr |
| 34 | } |
| 35 | |
| 36 | // NewBitsShape returns a new n-dimensional tensor of bit values |
| 37 | // using given shape. |