SciPy

scipy.optimize.OptimizeResult.update

OptimizeResult.update(E, **F) → None. Update D from dict/iterable E and F.

If E has a .keys() method, does: for k in E: D[k] = E[k] If E lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]