Scipy minimize not finding minimum