I have a somewhat weird problem which is probably derived from how indexing works in numpy. But for some reason I don\'t seem to understand it, let alone reach the behavior