I have an array :
A = np.array([1,2,2,2,3,3,1,1,1,4,4,4,4,4,5,5])
I want to do some function that will split A into smaller arrays (or lists, either works - I will use lists in the example easier to write), each made up of a chunk of the same number.
B = stackoverflowgeniusfunc(A)
B
[[1],[2,2,2],[3,3],[1,1,1],[4,4,4,4,4],[5,5]]
How do I do this?