Closed laubapires closed 1 year ago
Also include operations such as 'reshape'
def denfit(rho_guess, fvec, args):
rho_guess = rho_guess[0]
ncomp = args[-1]
ncomp = int(ncomp)
x = args[0:ncomp]
m = args[ncomp:ncomp*2]
s = args[ncomp*2:ncomp*3]
e = args[ncomp*3:ncomp*4]
t = args[ncomp*4]
p = args[ncomp*4 + 1]
k_ij = args[ncomp*4 + 2:-1]
k_ij = k_ij.reshape(ncomp, ncomp)
Use the numba.carray command illustrated in the README to convert the input array to a numpy array. Then the slicing will work
Actually take a look at the README for this other similar package
I am using NumbaMinpack to minimize 1 equation, however args has a dimension of 24, but it is a flat numpy array, and in the minimized function I break down each parameter from the 24-dimension array. but I receive the following error. Therefore, is it not possible to slice the args argument afterwards?
``