Update sp.py

minor fix