def set_options_from_YAML(self, filename):
if not os.path.isfile(filename):<EOL><INDENT>raise IOError("<STR_LIT>".format(filename))<EOL><DEDENT>stream = open(filename)<EOL>data_dict = yaml.safe_load(stream)<EOL>self.set_options_from_dict(data_dict, filename)<EOL>
Load options from a YAML-formated file.

        :param str filename: File from which to load the options.

        :raise:
            :IOError: If ``filename`` does not exist.