Loading...
Reshape arrays into different dimensions.
NumPy reshape operations:
Write a function reshape_array(arr, rows, cols) that reshapes a 1D array.
Return a dictionary with:
arr = [1,2,3,4,5,6], rows = 2, cols = 3
{'reshaped': [[1, 2, 3], [4, 5, 6]], ...}reshape(2,3) creates 2 rows of 3, transpose swaps dimensions