We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fb4139 commit 6778384Copy full SHA for 6778384
src/GNNGraphs/utils.jl
@@ -34,10 +34,8 @@ function cat_features(xs::Vector{<:NamedTuple})
34
35
# concatenate
36
syms = symbols[1]
37
- dims = [max(1, ndims(xs[1][k])) for k in syms] # promote scalar to 1D
38
- methods = [dim == 1 ? vcat : hcat for dim in dims] # use optimized reduce(hcat,xs) or reduce(vcat,xs)
39
NamedTuple(
40
- k => reduce(methods[ii],[x[k] for x in xs]) for (ii,k) in enumerate(syms)
+ k => cat_features([x[k] for x in xs]) for (ii,k) in enumerate(syms)
41
)
42
end
43
0 commit comments