Allows one to cast an operation to a different shape with the same volume.
The operation to be reshaped.
The new shape.
The new Operation.
1 import dopt.core : evaluate; 2 3 auto r1 = float32([2, 2], [1.0f, 2.0f, 3.0f, 4.0f]).reshape([1, 4]); 4 5 assert(r1.shape == [1, 4]); 6 assert(r1.evaluate().as!float == [1.0f, 2.0f, 3.0f, 4.0f]);
See Implementation
Allows one to cast an operation to a different shape with the same volume.