Reshaping in NumPy
This lesson explains how to reshape an array into various dimensions.
As explained in the previous lesson, to create a basic NumPy array write:
Z = np.array([0,0,0,0,0,0,0,0,0,0,1,0]
┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┏━━━┓───┐
│ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 │ 0 ┃ 1 ┃ 0 │
└───┴───┴───┴───┴───┴───┴───┴───┴───┴───┗━━━┛───┘
Get hands-on with 1400+ tech skills courses.