Hello,
           I have enclosed a minimum reproducible example with data (as SO demands) and I am trying to use two methods in the scipy optimize package - https://docs.scipy.org/doc/scipy/reference/optimize.html

One is minimize_scalar and the other is Brent's method. But both the outputs have large differences. Can anybody explain why ?

Also I get a runtime error while running Brent- 

test.py:29: RuntimeWarning: invalid value encountered in power
  ls = np.sum((x1[1:] - x1[:-1]*np.sign(a)*a**dt)**2) 

Additionally the Brent one has another one if I specify a triple interval
ala -  dum = brent(func,brack=(-1,0,1),tol=3.0e-8)
ValueError  : Not a bracketing interval. 

https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.brent.html But docs say that I can specify a triplet in the bracketing interval. 

I could have asked this on SO (and I still can) but this is more of a discussion oriented question so hence posted here. If a bug please advise appropriately as I can open on github. 

Regards,
Ashwin.