2

My code:

(x, y, t) = mlab.psd(
    d,
    Fs=1.0 / h['xdelta'],
    NFFT=512)
psd = 20 * np.log10(y)
plt.plot(x, y, t)
plt.show()

I just get a the following error upon execution:

ValueError: shape mismatch: objects cannot be broadcast to a single shape.

I feel like this is something simple, but I can't seem to get it to work. How would I go about fixing this?

Ralf
  • 16,086
  • 4
  • 44
  • 68
Orange
  • 43
  • 13
  • 1
    toy data for d, h would let others run the code – f5r5e5d Nov 15 '17 at 20:39
  • 2
    Please read and understand [mcve]. When reporting about an error also include the full error traceback, not just the last line. – ImportanceOfBeingErnest Nov 15 '17 at 21:59
  • Possible duplicate of [What does this error mean: ValueError: shape mismatch: objects cannot be broadcast to a single shape?](https://stackoverflow.com/questions/16950074/what-does-this-error-mean-valueerror-shape-mismatch-objects-cannot-be-broadca) – kenorb Jun 29 '19 at 23:29

0 Answers0