O
openopt
Thank you in advance for your response.
Dmitrey
Dmitrey
Thank you in advance for your response.
Thank you in advance for your response.
Dmitrey
Thank you in advance for your response.
Dmitrey
Ok, thx
But can I somehow determing how many outputs does caller func require?
for example:
MATLAB:
function [objFunVal firstDerive secondDerive] = simpleObjFun(x)
objFunVal = x^3;
if nargout>1
firstDerive = 3*x^2;
end
if nargout>2
secondDerive = 6*x;
end
So if caller wants only
[objFunVal firstDerive] = simpleObjFun(15)
than 2nd derivatives don't must to be calculated with wasting cputime.
Is something like that in Python?
Ok, thx
But can I somehow determing how many outputs does caller func require?
for example:
MATLAB:
function [objFunVal firstDerive secondDerive] = simpleObjFun(x)
objFunVal = x^3;
if nargout>1
firstDerive = 3*x^2;
end
if nargout>2
secondDerive = 6*x;
end
So if caller wants only
[objFunVal firstDerive] = simpleObjFun(15)
than 2nd derivatives don't must to be calculated with wasting cputime.
Is something like that in Python?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.