MakeShape returns a Shape with the provided size of each dimension. A value of -1 implies that the size of the corresponding dimension is not known.
(shape ...int64)
| 40 | // A value of -1 implies that the size of the corresponding dimension is not |
| 41 | // known. |
| 42 | func MakeShape(shape ...int64) Shape { |
| 43 | cpy := make([]int64, len(shape)) |
| 44 | copy(cpy, shape) |
| 45 | return Shape{dims: cpy} |
| 46 | } |
| 47 | |
| 48 | // NumDimensions returns the number of dimensions represented by s, or -1 if |
| 49 | // unknown. |