Returns a tensor with the same entries in row-major order but a different shape, which must have the same size (unlike resize, which truncates or pads with zeros).
The tensor
The shape to change to, either as a sequence of arguments or one array
const result = Chalkboard.tens.reshape([1, 2, 3, 4, 5, 6], 2, 3); // Returns [[1, 2, 3], [4, 5, 6]] Copy
const result = Chalkboard.tens.reshape([1, 2, 3, 4, 5, 6], 2, 3); // Returns [[1, 2, 3], [4, 5, 6]]
Returns a tensor with the same entries in row-major order but a different shape, which must have the same size (unlike resize, which truncates or pads with zeros).