Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def import_solver(self):
"""Imports the solver.
"""
import diffcp
patch_version = int(diffcp.__version__.split('.')[2])
if patch_version < 7:
raise ImportError("diffcp >= 1.0.7 is required")