Assigning the outputs of fmin in scipy. optimize - Stack Overflow Although this seems like the right way to use fmin, I was thinking along the lines of Matlab's "varargout", in which the optional outputs have a specific order (varargout {1}, varargout {2}, etc ) and the user can assign any number of outputs depending on how many he is interested in