Assume, I have a NumPy-array of integers, as:
[34,2,3,22,22,22,22,22,22,18,90,5,-55,-19,22,6,6,6,6,6,6,6,6,23,53,1,5,-42,82]
I want to find
There really isn't a great short-cut for this. You can do something like:
mult = 5 for elem in val_list: target = [elem] * mult found_at = val_list.index(target)
I leave the not-found exceptions and longer sequence detection to you.