Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/arrayfire/arrayfire
/ gfor
Function
gfor
examples/machine_learning/kmeans.cpp:49–52 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
47
array clustersd = tile(clusters, 1, 1, d);
48
49
gfor(seq ii, k) {
50
means(span, ii, span) =
51
sum(data * (clustersd == ii)) / (sum(clusters == ii) + 1e-5);
52
}
53
54
return means;
55
}
Callers
nothing calls this directly
Calls
1
sum
Function · 0.50
Tested by
no test coverage detected