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

scipy.optimize.OptimizeResult.popitem

OptimizeResult.popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.