We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'numpy.float64' object cannot be interpreted as an integer
The text was updated successfully, but these errors were encountered:
This is happening for us too, in the below code on line 53 of calculatemoments.py:
def get_object_moment(pixels, func): labs = np.unique(pixels) moms = np.zeros([np.max(labs) + 1, 1]) for l in labs: if l != 0: px = pixels[np.where(pixels == l)] moms[l] = func(px) return moms
pixels is an array of floats 0-1, so np.max(labs) is a float and the np.zeros falls over.
pixels
np.max(labs)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
TypeError: 'numpy.float64' object cannot be interpreted as an integer
The text was updated successfully, but these errors were encountered: