this code doesn't produce the 5% quantile:
v = np.sort( posteriors[i] )[ int(0.05*N) ]
this would do it:
v = np.sort( posteriors[i] , axis=0)[ int(0.05*N) ]