Computer-Vision icon indicating copy to clipboard operation
Computer-Vision copied to clipboard

ValueError: Length of weights not compatible with specified axis.

Open steve-bakos opened this issue 7 years ago • 0 comments

After copying over the code provided in this tutorial, I've run into what appears to be an error caused by a version difference in numpy.

In the img_grey() function, the line: return np.average(image, weights=[0.299, 0.587, 0.114], axis=2) is throwing the error mentioned in the title.

This is happening with numpy version 1.14. In your video tutorial, which version of numpy are you using?

steve-bakos avatar Jul 18 '18 11:07 steve-bakos