inversed matrix in Python, model works near flawlessly