(self, sset)
The sset can contain both solver names and pairs name options.
The sset can contain both solver names and pairs name options.
The sset can contain both solver names and pairs name options .
def _process_solver_set(self, sset):
        """The sset can contain both solver names and pairs name options."""
        global_opts = self.options.as_kwargs()
        # Remove solver_options from global_opts. These are the
        # Portfolio specific options and might not make sense for the
        # solvers.
        del global_opts["solver_options"]
        for elem in sset:
            if type(elem) is str:
                sname = elem
                opts = global_opts
            else:
                sname, local_opts = elem
                opts = dict(global_opts)
                for k,v in local_opts.items():
                    # local_opts has priority over global_opts
                    opts[k] = v
            self.solvers.append((sname, opts))
def _process_solver_set ( self , sset ) : global_opts = self . options . as_kwargs ( ) # Remove solver_options from global_opts. These are the # Portfolio specific options and might not make sense for the # solvers. del global_opts [ "solver_options" ] for elem in sset : if type ( elem ) is str : sname = elem opts = global_opts else : sname , local_opts = elem opts = dict ( global_opts ) for k , v in local_opts . items ( ) : # local_opts has priority over global_opts opts [ k ] = v self . solvers . append ( ( sname , opts ) )