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? -- http://mail.python.org/mailman/listinfo/python-list