Skip to content

Commit 411d26b

Browse files
nv-rliueriknw
andauthored
Update nx_cugraph/drawing/layout.py
Co-authored-by: Erik Welch <erik.n.welch@gmail.com>
1 parent 766ef2c commit 411d26b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

nx_cugraph/drawing/layout.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,10 @@ def forceatlas2_layout(
8989
x_start = start_pos_arr[:, 0]
9090
y_start = start_pos_arr[:, 1]
9191

92-
# match the float dtype on input graph's edgelist
93-
dtype = _get_float_dtype(dtype, graph=G, weight=weight)
94-
9592
if weight is not None:
96-
G = _to_graph(G, weight, 1, dtype)
93+
# match the float dtype on input graph's edgelist, default to float32
94+
G = _to_graph(G, weight, 1, _get_float_dtype(dtype))
95+
dtype = _get_float_dtype(dtype, graph=G, weight=weight)
9796
G_plc = G._get_plc_graph(weight, 1, dtype)
9897
else:
9998
G = _to_graph(G)

0 commit comments

Comments
 (0)