Mask python-r1 scipy