def empty(shape, dtype="float32", ctx=context(1, 0)):
    """Create an empty array given shape and device

    Parameters
    ----------
    shape : tuple of int
        The shape of the array

    dtype : type or str
        The data type of the array.

    ctx : DGLContext
        The context of the array

    Returns
    -------
    arr : dgl.nd.NDArray
        The array dgl supported.
    """
    shape = c_array(dgl_shape_index_t, shape)
    ndim = ctypes.c_int(len(shape))
    handle = DGLArrayHandle()
    dtype = DGLDataType(dtype)
    check_call(
        _LIB.DGLArrayAlloc(
            shape,
            ndim,
            ctypes.c_int(dtype.type_code),
            ctypes.c_int(dtype.bits),
            ctypes.c_int(dtype.lanes),
            ctx.device_type,
            ctx.device_id,
            ctypes.byref(handle),
        )
    )
    return _make_array(handle, False)
Create an empty array given shape and device

    Parameters
    ----------
    shape : tuple of int
        The shape of the array

    dtype : type or str
        The data type of the array.

    ctx : DGLContext
        The context of the array

    Returns
    -------
    arr : dgl.nd.NDArray
        The array dgl supported.
    
python/dgl/_ffi/ndarray.py