for t in range(x.shape[0]): x_t = x[t].reshape(-1, 1) combined = np.vstack((h_prev, x_t))