def METHOD_NAME(grids):
    x = np.array([-1, -1, 0, 0, 4, 6, 10], dtype='i8')
    y = np.array([-1,  2, 4, 1, 9, 6, 10], dtype='i8')
    ordinal_count = 5
    binner = vaex.superagg.BinnerOrdinal_int64('x', ordinal_count, 0)
    binner.set_data(x)
    grid = vaex.superagg.Grid([binner])
    agg = vaex.superagg.AggMax_int64(grid, 1, 1)
    agg_data = np.asarray(agg)
    agg_data[:] = 0
    agg_data -= 100
    agg.set_data(0, y, 0)
    grid.bin(0, [agg])
    agg_data = agg.get_result()
    assert agg_data.tolist() == [-100, 2, 4, -100, -100, -100, 9, 10]
    grid = vaex.superagg.Grid([binner])
    agg = vaex.superagg.AggMin_int64(grid, grids, grids)
    agg_data = np.asarray(agg)
    agg_data[:] = 0
    agg_data += 100
    agg.set_data(grids-1, y, 0)
    grid.bin(grids-1, [agg])
    agg_data = agg.get_result()
    assert agg_data.tolist() == [100, -1, 1, 100, 100, 100, 9, 6]