Trying to access all elements of an array via Array::left() produces the error:
Array::left(): Index out of range (in_range(n))
The same applies forArray::right(). Instead of the in_range() function the input should be checked to be positive and smaller or equal to ndata as done in the provided patch.