-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
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
segment_combine() fails with ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #928
Comments
i guess this should not work in the first place. see also: https://stackoverflow.com/questions/73190808/index-of-an-numpy-array-in-a-list |
Hi @eyaler thanks for opening this issue. I wrote the |
well, I am actually abusing plantcv morphology package for a custom non-plant thing for which it turned out to work great (and i can share details later if you wish). i am quite sure the code is erroneous as one cannot refer by item to numpy array items in a python list |
Very interesting! Definitely interested to hear more details of what type of data you're extracting. This sub-package has seemed to be helpful for a handful of non-plant researchers so far :D I spent some time digging back into the code from the |
thanks! if you want to do it in place you could find the indices to be removed and then loop in reverse order from the end. or you could just create a new list. will share soon :) |
I did some testing this morning and wanted to share the updated
|
segment_combine() fails with
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
minimal code to reproduce:
full error:
Local environment:
The text was updated successfully, but these errors were encountered: