I wrote a code that manipulates sub arrays of an ndarray and then attempts to combine the results into a single ndarray of a higher dimension.
import numpy as