As I'm trying to understand broadcasting in python, I'm coming across a shape mismatch error. I know this means that the arrays I have don't fit in terms of dimension. My code basically tries to do the following operations on the arrays with the following dimensions:
(256,256,3)*(256,256)+(256,256)
I know the problem is in the multiplication. I was wondering if there is any way to fix this? Can I add an extra dimension to the (256,256) array of the multiplication?
numpy.newaxisto add new dimensions