Remove nodes and edges

Hi, I see your docs, it says in https://docs.dgl.ai/en/0.4.x/api/python/graph.html

NOTE: Removing nodes and edges is not supported by DGLGraph.

But I also find function

DGLGraph.remove_nodes(*args, **kwargs)	
DGLGraph.remove_edges(*args, **kwargs)	

So Does DGLGraph support removing nodes or edges now?

Sorry for the inconvenient, we do support removing nodes/edges (however they are not very efficient so do not use them frequently), the NOTE is outdated and we will remove it soon.

Would it be possible to return a new graph with edges removed ?
Or could you tell me how to deep copy graph?

You need to use the latest DGL and there are two APIs:

new_g = dgl.remove_edges(g)
new_g = dgl.remove_nodes(g)

which will return a new graph.