def _to_arrays(*args):
    nargs = []
    single = True
    for a, ndim in args:
        try:
            arg = np.array(a, copy=False)
        except __HOLE__:
            # Typically end up in here when list of Shapely geometries is
            # passed in as input.
            arrays = [np.array(el, copy=False) for el in a]
            arg = np.array(arrays, copy=False)
        if arg.ndim != ndim - 1:
            single = False
        arg = _shape_func[ndim](arg)
        nargs.append(arg)

    return single, nargs
dataset/ETHPy150Open jwass/geog/geog/geog.py/_to_arrays