Numpy Note

x.shape = (1, 2) or (1, )

x.size = total number of elements

np.empty([1, 2])

np.trace(X)

 

 

import scipy as sp

sp.optimize.minimize(func, x0, arg=() ) where x0 is the initial guess that specifies the soln’s dimension, arg is the tuple that contains extra argument to func

returns scipy.optimize.OptimizeResult

scipy.optimize.OptimizeResult.x is the soln, possibly multiple elements because the dimension might be greater than 1

sp.optimize.bisect

 

Leave a Reply

Your email address will not be published. Required fields are marked *