Data-Science-for-Marketing-Analytics icon indicating copy to clipboard operation
Data-Science-for-Marketing-Analytics copied to clipboard

Cluster bar plot exercise 17

Open holstadla opened this issue 4 years ago • 0 comments
trafficstars

i get the following error for part 6 of exercise 17

ValueError Traceback (most recent call last) in () 6 7 ax = plt.subplot(3, 1, i+1) ----> 8 plt.barh([1,2,3],means) 9 ax.set_yticks([1,2,3]) 10 ax.set_yticklabels(['college','highschool','less_than_highschool'])

5 frames <array_function internals> in broadcast_arrays(*args, **kwargs)

/usr/local/lib/python3.6/dist-packages/numpy/lib/stride_tricks.py in _broadcast_shape(*args) 187 # use the old-iterator because np.nditer does not handle size 0 arrays 188 # consistently --> 189 b = np.broadcast(*args[:32]) 190 # unfortunately, it cannot handle 32 or more arguments directly 191 for pos in range(32, len(args), 31):

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

holstadla avatar Dec 19 '20 23:12 holstadla