Skip to content

ValueError: Length of weights not compatible with specified axis. #1

Description

@steve-bakos

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions