Hi swederik, here it looks like yo assume we're working with 3d data. This class has been designed to work with data of any dimensionality. We could use `numpy.ndindex` here to make this compatible with data of any dimensionality. There might also be a way to avoid for loops here altogether, but I'd have to give it some thought.