I have some problems with minimization with multivariables AND
hypergeometric
functions in Sage while I'm translating my physics problem code into sage.
When I try
minimize(x^2+y^2,[0.1,0.1],algorithm="default")
it obviously works: (0.0,0.0)
The minimization for hypergeometric functions seems to work as
minimize(hypergeometric([1],[1],x) + x^2, [0.1],algorithm="default")
But, the next one does not work. Do you have any suggestion for an
alternative way to evaluate the minimum?
minimize(hypergeometric([1],[1],x) + x^2 + y^2,
[0.1,0.1],algorithm="default")
It shows the following error:
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/smc_sagews/sage_server.py",
line 905, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/numerical/optimize.py",
line 327, in minimize
min= optimize.fmin_bfgs(f, [float(_) for _ in x0],fprime=gradient,
**args)
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/scipy/optimize/optimize.py",
line 777, in fmin_bfgs
res = _minimize_bfgs(f, x0, args, fprime, callback=callback, **opts)
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/scipy/optimize/optimize.py",
line 832, in _minimize_bfgs
gfk = myfprime(x0)
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/scipy/optimize/optimize.py",
line 281, in function_wrapper
return function(*(wrapper_args + args))
File
"/projects/sage/sage-6.9/local/lib/python2.7/site-packages/sage/numerical/optimize.py",
line 319, in <lambda>
gradient=lambda p: scipy.array([ a(*p) for a in
fast_gradient_functions])
File "sage/ext/interpreters/wrapper_rdf.pyx", line 80, in
sage.ext.interpreters.wrapper_rdf.Wrapper_rdf.__call__
(/projects/sage/sage-6.9/src/build/cythonized/sage/ext/interpreters/wrapper_rdf.c:1746)
return self._domain(interp_rdf(c_args
File "sage/symbolic/expression.pyx", line 4821, in
sage.symbolic.expression.Expression.__call__
(/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/expression.cpp:27873)
return self._parent._call_element_(self, *args, **kwds)
File "sage/symbolic/ring.pyx", line 796, in
sage.symbolic.ring.SymbolicRing._call_element_
(/projects/sage/sage-6.9/src/build/cythonized/sage/symbolic/ring.cpp:9827)
raise ValueError("the number of arguments must be less than or equal to
%s"%len(vars))
ValueError: the number of arguments must be less than or equal to 1
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.