ValueError: x and y can be no greater than 2D, but have shapes (144,) and (144, 500, 144)

I changed:

ax[1].plot(df["Month"], _sample(posterior_trend, 100).T * y_max, color="blue", alpha=0.01)

to

ax[1].plot(df["Month"], _sample(posterior_trend, 144).T * y_max, color="blue", alpha=0.01)
df.plot.scatter(x="Month", y="#Passengers", color="k", ax=ax[1])

When I change it back to 100, I get an error of a size mismatch. Changing it to 144 matches my input data size.

Specifically the amount of samples taken. In the tutorial, the _sample function is

def _sample(array, n_samples):
    """Little utility function, sample n_samples with replacement"""
    idx = np.random.choice(np.arange(len(array)), n_samples, replace=True)
    return array[idx]