NewBitsShape returns a new n-dimensional tensor of bit values using given shape.
(shape *Shape)
| 36 | // NewBitsShape returns a new n-dimensional tensor of bit values |
| 37 | // using given shape. |
| 38 | func NewBitsShape(shape *Shape) *Bits { |
| 39 | tsr := &Bits{} |
| 40 | tsr.Shp.CopyShape(shape) |
| 41 | tsr.Values = bitslice.Make(tsr.Len(), 0) |
| 42 | return tsr |
| 43 | } |
| 44 | |
| 45 | func Float64ToBool(val float64) bool { |
| 46 | bv := true |