I have a question about searching through arrays. I need to find some string sequence which I have stored in array and forexample it might look like this array1:
['818181' '747473' '747474' '636363' '767676' '737373' '727373' '373838'
'697070' '686869' '115115115' '737474' '757575' '777777' '818181' '747473'
'747474' '636363' '767676' '737373' '727373' '757575' '696969']
It's a numpy array with strings. Dtype shows it is S9. Then I have another main array with same structure, but much more bigger. I am looking for most effective way to find position where array1 begins in main array so it is like I am looking for specified pattern in numpy array. These value repeat and I need to find exact same one. I have been looking for best solutions for this but I couldn't find anything what would help. Main array is very big and I need to get array1 position in under 1s. I found some sample scripts on finding sequence in array unfortunately none of this helped me. Mostly they were finding some integer values in small arrays. I need some advice.
I tried going through whole array with for i, e in enumerate() So one element look like this - '818181'. Then I was counting if 23 elements in a row(in this example) are the same. But when 5th element was wrong then I would have to go where I found 1st to get 100% successful(because patters can go on each other) and it was very slow.
Main array is like array1 but 1000x and has more values