Python Forum
How to use scipy.optimization.brute for multivariable function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use scipy.optimization.brute for multivariable function
#7
(Oct-21-2020, 11:44 PM)scidam Wrote: It seems that f(x, y) returns too large values. Could you provide implementation of f(x, y) here? Actually, this is not an error, just a warning.

Sorry for the late reply. I got stuck with some other businesses.
Here is a simplified form of my function. If you will compile, you will see two errors.
import math
import numpy as np
from scipy import optimize

def fT(X,T):
  p=X[0]
  q=X[1]
  r=pow(p,2) + pow(p,4) 
  Vtest = (( -(r**4)*(math.log((r**2)/(T**2))) ))
  return Vtest


grid = ((10, 40, 1), (10, 40, 1))
xmin_globalT =optimize.brute(fT, grid, (567,) )
print(xmin_globalT)
The errors are
/usr/..:RuntimeWarning: overflow encountered in double_scalars
  if __name__ == '__main__':
/usr/../scipy/optimize/optimize.py:597: RuntimeWarning: invalid value encountered in subtract
  numpy.max(numpy.abs(fsim[0] - fsim[1:])) <= fatol):
Thanks in advance.
Reply


Messages In This Thread
RE: How to use scipy.optimization.brute for multivariable function - by Shiladitya - Oct-25-2020, 07:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Minimize function with SciPy PierreLCV 3 381 Apr-05-2024, 07:51 AM
Last Post: paul18fr
  Need an alternative to brute force optimization loop jmbonni 5 1,252 Dec-07-2023, 12:28 PM
Last Post: RockBlok
  Solving an equation by brute force within a range alexfrol86 3 2,857 Aug-09-2022, 09:44 AM
Last Post: Gribouillis
  Optimization using scipy.optimize KaneBilliot 3 1,931 Nov-30-2021, 08:03 AM
Last Post: Gribouillis
  I need advise with developing a brute forcing script fatjuicypython 11 5,174 Aug-21-2020, 09:20 PM
Last Post: Marbelous
  ModuleNotFoundError: No module named 'scipy.optimize'; 'scipy' is not a package AaronKR 1 10,348 Jul-09-2020, 02:36 AM
Last Post: bowlofred
  Password Brute Force 2skywalkers 9 5,443 Oct-18-2018, 02:35 PM
Last Post: buran
  Brute Force Password Guesser 2skywalkers 1 3,210 Oct-05-2018, 08:04 PM
Last Post: ichabod801
  Brute Force Pad Lock Guesser RedSkeleton007 4 3,992 Mar-03-2018, 07:42 AM
Last Post: RedSkeleton007
  Speeding up Brute force password guesser Gamervote 5 6,898 Jul-20-2017, 02:52 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020