All problems
MediumNumPy
NumPy — reshape
Take arange(12) and reshape into a 3×4 matrix.
- #numpy
- #reshape
Sample input
arange(12), shape (3, 4)
Sample output
[[ 0 1 2 3] [ 4 5 6 7] [ 8 9 10 11]]
numpy-reshape.pyneeds: numpy
Output
Press "Run code" to execute.
