Reduce_sum with padded arrays

Thanks for the clarification it makes sense, I should set the same range for \eta and Y, but unfortunately, your suggestion didn’t work.

I found this discussion about Error message:"index: accessing element out of range” when using reduce_sum, which exposes the same approach you suggest. I’ll look deeper at that and think about Bob’s solution using ragged arrays.

I’ll come back if I have any updates!

Thanks one more time!