[Solved] Np.argwhere error: maximum recursion depth exceeded while calling

The complete error is: recursionerror: maximum recursion depth exceeded while calling a python object

resolvent

It is suggested to modify this usage according to the code logic, NP. Argwhere the original meaning of usage is to filter out the values that meet the conditions in numpy , such as:

np.argwhere(y == label)

It is to filter the value of y = = label , but this usage is very dangerous and can be rewritten as:

np.argwhere(sum(y == label))

Recommend another way to write code logic!!!

Read More: