MCPcopy
hub / github.com/dmlc/dgl / to_double

Function to_double

python/dgl/transforms/functional.py:3783–3798  ·  view source on GitHub ↗

r"""Cast this graph to use float64 (double-precision) for any floating-point edge and node feature data. A shallow copy is returned so that the original graph is not modified. Feature tensors that are not floating-point will not be modified. Returns ------- DGLGraph

(g)

Source from the content-addressed store, hash-verified

3781
3782
3783def to_double(g):
3784 r"""Cast this graph to use float64 (double-precision) for any
3785 floating-point edge and node feature data.
3786
3787 A shallow copy is returned so that the original graph is not modified.
3788 Feature tensors that are not floating-point will not be modified.
3789
3790 Returns
3791 -------
3792 DGLGraph
3793 Clone of graph with the feature data converted to float64.
3794 """
3795 ret = copy.copy(g)
3796 ret._edge_frames = [frame.double() for frame in ret._edge_frames]
3797 ret._node_frames = [frame.double() for frame in ret._node_frames]
3798 return ret
3799
3800
3801def double_radius_node_labeling(g, src, dst):

Callers

nothing calls this directly

Calls 1

doubleMethod · 0.45

Tested by

no test coverage detected