import numpy as np
from scipy.optimize import _minimize
from scipy import special
import matplotlib.pyplot as plt
Note the underscore before 'minimize' when importing from scipy.optimize; '_minimize'
Also, i tested the functions from this link before doing this section, and found I had ...