Reshaping in NumPy

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 │
   └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┗━━━┛───┘