Adjust code after arrayview from getindex to make tests pass