def array_representer(dumper, data):
    """For cleaner printing of arrays in yaml files."""
    out = data.tolist()
    if data.ndim <= 1:
        return dumper.represent_sequence('tag:yaml.org,2002:seq', out,
            flow_style=True)
    else:
        return dumper.represent_sequence('tag:yaml.org,2002:seq', out,
            flow_style=False)
