Depending on your setting (number of CPU etc), pm.sample calls will sample multi-chains for you, in this case, likely you have two chains, which means you have 1000*2 = 2000 total samples, which is what you see in the first number in np.shape(pm.trace_to_dataframe(trace_N)).
And since the old plotting plot one chains on top of the other, you will see 2 lines when the random variable is a scalar or a 1 element tensor.