Skip to content
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

The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #6

Open
Programmer786 opened this issue Feb 24, 2018 · 2 comments

Comments

@Programmer786
Copy link

Sir i have run a code on window 8.1 OS .so in this drawDefects function those error occur please help me sir.

def drawDefects(self, bubbles = False):
defectPoints = []
minDistance = 1000
if self.defects != None: # in this line give a error
for i in self.defects:
if i[0][3] > minDistance:
defectPoints.append(self.handContour[i[0][2]])
defectPoints = np.array(defectPoints, dtype=np.int32)
if bubbles:
self.drawBubbles(defectPoints, (0, 0, 255), width=10)

@redpower5x5
Copy link

Hi! same problem on Raspberry) I'm looking forward for solution)

@Suraj520
Copy link

Suraj520 commented Nov 2, 2018

Replace the line " self.defects != None: " with " if len(self.defects)!=0:" and the code should run perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants