Centroid of a set of N-dimensional points: Difference between revisions
Centroid of a set of N-dimensional points (view source)
Revision as of 03:38, 17 July 2023
, 10 months ago→{{header|Julia}}: err handling
(Added Wren) |
m (→{{header|Julia}}: err handling) |
||
Line 44:
function centroid(arr)
isempty(arr) && return Point{Float64, 0}(arr)
n = length(arr[begin])
t = typeof(arr[begin][begin])
|