def polygons_to_cells_experimental()

in src/h3/_cy/latlng.pyx [0:0]


def polygons_to_cells_experimental(polygons, int res, int flag):
    mvs = [
        polygon_to_cells_experimental(outer=poly.outer, res=res, holes=poly.holes, flag=flag)
        for poly in polygons
    ]

    n = sum(map(len, mvs))
    hmm = H3MemoryManager(n)

    # probably super inefficient, but it is working!
    # tood: move this to C
    k = 0
    for mv in mvs:
        for v in mv:
            hmm.ptr[k] = v
            k += 1

    return hmm.to_mv()