0

Is there a built in method to find a non numpy element in an array containing numpy arrays.

I tried

arr = [np.array(1,0), np.array(0,1), 0] print(0 in arr)

But it resulted in ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

  • https://stackoverflow.com/questions/68007711/find-indices-in-numpy-arrays-consisting-of-lists-where-element-is-in-list – Andrew Ryan Jan 07 '23 at 03:00

0 Answers0