def from_file(filename, section='matrix'):
    """
    Generate a matrix from a .ini file. Configuration is expected to be in a ``[matrix]`` section.
    """
    config = parse_config(open(filename), section=section)
    return from_config(config)