Update affine.py