LoginSignup
0
0

More than 3 years have passed since last update.

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

Posted at

juoyter-notebookでグラフ表示の勉強中にでたエラーです。

縦(value)1~6、横(y_pos)a~fの簡単な棒グラフを表示させたい。

コード

image.png

エラー

image.png

直訳すると、
ValueError:形状の不一致:オブジェクトは単一の形状にブロードキャストできません

不一致と思われるものは定義した値くらい?
値を見にいく、
1, 2, 3, 4, 5, 6
a, b, c, d, f
eが抜けている!!

解決コード

image.png

'e'を追加して無事成功

表示成功

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0