import csv


def build_dict(filename: str) -> dict:
    """
    Convert the Iris CSV data file to a python dictionary.
    """    
    a=[]
    with open(filename, newline='') as csvfile:
        c = csvfile
        reader = csv.DictReader(csvfile)
        for row in reader:
            vec = [float(row["sl"]), float(row["sw"]), float(row["pl"]), float(row["pw"])]
            a.append(vec)

    features=["Sepal length","Sepal width","Petal length", "Petal Width"]
    d = dict(data=dict(names=features, ndarray=a))
    return d