When I ran the QA code with input vectors [0,1,2,3] and [0,1,2,3,4,5,6,7], it provides outputs of [0,1] and [0,1,4,5], respectively which are correct.
When I changed the QA input vector to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], it bombs and states handler caught exception: index 4 is out of bounds for axis 0 which is size 4. I think it is telling me that out has length 4 and can only take 4 values. How can this be? I did not set a size for out, I am letting the program write into out and that should determine its size.
Thanks again for your help.