SciPy

This is documentation for an old release of SciPy (version 1.5.3). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.optimize.OptimizeResult.setdefault

OptimizeResult.setdefault(self, key, default=None, /)

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

Previous topic

scipy.optimize.OptimizeResult.popitem

Next topic

scipy.optimize.OptimizeResult.update