m = np.mgrid[:3, :4]
m.shape
m
ll = list(zip(*(v.ravel() for v in m)))
ll
a2 = np.empty(m.shape[1:], dtype=object)
a2.ravel()[:] = ll
a2
Efficient converting of numpy int array with shape (M, N, P) array to 2D object array with (N, P) shape