title: ValueError: x and y must have same first dimension, but have shapes (165,) and (166,)
body: <p>I'm looping through a list of audio filenames, loading them, calculating the STE and RMSE, and then plotting said values. However, the occasional error message is thrown for about 20% of the files.</p>
  <pre><code>ValueError: x and y must have same first dimension, but have shapes (165,) and (166,)
  ValueError: x and y must have same first dimension, but have shapes (240,) and (241,)
  </code></pre>
  <p>So on and so forth.</p>
  <p>I took a look at <a href="https://stackoverflow.com/questions/63594625/why-do-i-keep-on-getting-x-and-y-must-have-same-first-dimension-but-have-shape">this question</a> and I believe the problem may be similar as I am also using square brackets in my call to <code>plt.plot</code> on line 2 of the code below. However, changing this to parentheses throws a syntax error. I also find it strange that only 20% of &gt;1000 samples are affected and that the shape seems to be incremented by 1.</p>
  <p>Is this a metadata issue? What exactly could be causing this problem?</p>
  <pre><code>frames = range(len(energy))
  t = librosa.frames_to_time(frames, sr=SAMPLE_RATE, hop_length=HOP_LENGTH)
  
  plt.figure(figsize=(15, 5))
  plt.plot(t[:len(rmse)], rmse_max_scaled, color='b')
  plt.plot(t, energy_max_scaled, 'r--')
  librosa.display.waveplot(sample, sr=SAMPLE_RATE, alpha=0.4)
  plt.legend(('RMSE', 'Energy'))
  </code></pre>