Convert 3d Array To 2d Array Python