dimension_classes = ["Real", "Integer", "Categorical"]
// Extract space options for configuration file
options_name = namespace or list(cfg.keys())[0]
options = cfg if isinstance(cfg, list) else cfg[options_name]
// Populate list with Dimension objects
dimensions = []
for option in options:
key = list(option.keys())[0]
// Make configuration case insensitive
dimension_cls = key.title()
values = {k.lower(): v for k, v in option[key].items()}
if dimension_cls in dimension_classes:
After Change
// Extract space options for configuration file
if isinstance(config, dict):
if namespace is None:
options = next(iter(config.values()))
else:
options = config[namespace]
elif isinstance(config, list):
options = config