SciPy in-class modifications