NewNumberShape returns a new n-dimensional tensor of numerical values using given shape.
(shape *Shape)
| 78 | // NewNumberShape returns a new n-dimensional tensor of numerical values |
| 79 | // using given shape. |
| 80 | func NewNumberShape[T num.Number](shape *Shape) *Number[T] { |
| 81 | tsr := &Number[T]{} |
| 82 | tsr.Shp.CopyShape(shape) |
| 83 | tsr.Values = make([]T, tsr.Len()) |
| 84 | return tsr |
| 85 | } |
| 86 | |
| 87 | func (tsr *Number[T]) IsString() bool { |
| 88 | return false |