def METHOD_NAME(ppci, net):
    is_quadratic = net.poly_cost[["cp2_eur_per_mw2", "cq2_eur_per_mvar2"]].values.any()
    q_costs = net.poly_cost[["cq1_eur_per_mvar", "cq2_eur_per_mvar2"]].values.any() or \
        "q" in net.pwl_cost.power_type.values
    rows = len(ppci["gen"])*2 if q_costs else len(ppci["gen"])
    if len(net.pwl_cost):
        nr_points = {len(p) for p in net.pwl_cost.points.values}
        points = max(nr_points)
        if is_quadratic:
            raise ValueError("Quadratic costs can be mixed with piecewise linear costs")
        columns = COST + (max(points, 2) + 1)*2
    else:
        columns = COST + 3 if is_quadratic else COST + 2
    ppci["gencost"] = zeros((rows, columns), dtype=float)
    return is_quadratic, q_costs