Understanding the behavior of the geometric mean for multidimensional arrays

I would like to understand how I can take the geometric mean of an array across a certain dimension. For the mean value, I normally use:

mean(x, dims=1)

But the same does not work for geometric mean, why?

using Statistics

x = [1 2 3 ; 4 5 6]
geomean(x, dims=1)

ERROR: MethodError: no method matching geomean(::Array{Int64,2}; dims=1)
Closest candidates are:
  geomean(::Any) at /home/josimar/.julia/packages/StatsBase/548SN/src/scalarstats.jl:16 got unsupported keyword argument "dims"
 [1] top-level scope at REPL[30]:1

Note that the above error for the geomean also occurs for the harmmean and percentile.

These functions (which are part of StatsBase.jl, not Julia itself) do not support the dims keyword. There is an issue for adding this functionality.

You can use geomean.(eachcol(x)) instead, but it will return a vector instead of a row matrix:

julia> using StatsBase

julia> x = [1 2 3 ; 4 5 6]
2×3 Matrix{Int64}:
 1  2  3
 4  5  6

julia> geomean.(eachcol(x))
3-element Vector{Float64}: