[PYTHON] ValueError: shape mismatch: objects cannot be broadcast to a single shape

This is an error that occurred while studying graph display on juoyter-notebook.

I want to display a simple bar graph with vertical (value) 1 ~ 6 and horizontal (y_pos) a ~ f.

code

image.png

error

image.png

Translated literally ValueError: Shape mismatch: Object cannot be broadcast to a single shape

What seems to be a discrepancy is about the defined value? Go to see the value, 1, 2, 3, 4, 5, 6 a, b, c, d, f e is missing! !!

Resolution code

image.png

Add'e'and succeed

Display successful

image.png

Recommended Posts

ValueError: shape mismatch: objects cannot be broadcast to a single shape
What to do when a video cannot be read by cv2.VideoCapture
A solution to the problem that the Python version in Conda cannot be changed