NewString returns a new n-dimensional tensor of string values with the given sizes per dimension (shape), and optional dimension names.
(sizes []int, names ...string)
| 23 | // NewString returns a new n-dimensional tensor of string values |
| 24 | // with the given sizes per dimension (shape), and optional dimension names. |
| 25 | func NewString(sizes []int, names ...string) *String { |
| 26 | tsr := &String{} |
| 27 | tsr.SetShape(sizes, names...) |
| 28 | tsr.Values = make([]string, tsr.Len()) |
| 29 | return tsr |
| 30 | } |
| 31 | |
| 32 | // NewStringShape returns a new n-dimensional tensor of string values |
| 33 | // using given shape. |