non-homogeneous matrices, numpy, shift problem not solved