I have a one dimensional numpy array. Everything in it should be integer multiples of 10. I need to search through it, and find anywhere where my integer multiples are greater than 10, i.e. 20, 30, etc. And when I find one I need to be able to identify the value of the indices where the break occurs and use them for some processing. I also need to return individual values that are isolated and do something different with them. For example,
0, 10, 20, 60, 80, 90, 100
From 0 to 20 is one set, so I need to get back the 0 and 20 and do something, and likewise the 80 to 100 are a set and the same should occur. The 60 though is just a value on it's own, so I need to see that it's just an isolated single value and do some separate processing for it, and then resume at 80 to get the right result.
Been trying to figure out a reasonable way to do this with numpy and haven't come up with much. The datasets are very large, so the more efficient the better. There should in theory be no duplication of value within sets and they should always progress as we move forward through the array. Thanks for any help in advance.