Why can't I find the location of a tuple in an array? Afterall, the bottom expression prints True
foo = numpy.array([(5, 30), (5,), 5])
bar = numpy.where(foo==foo[0])
print(bar)
Prints (array([], dtype=int64),)
print((5,30)==foo[0])
Prints True
foois adtype=objectarray (different size tuples). Many of the usual numeric array operations, including comparison, are not implemented for this dtype.fooshould be a list.