p = np.concatenate(p, axis = 0 )

Read more of this post