Skip to content

Commit

Permalink
fix print mean for show MKD on ProductRepr
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Sep 29, 2021
1 parent 873e74b commit 3ac4a74
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/services/ManifoldKernelDensity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,20 @@ function Base.show(io::IO, mkd::ManifoldKernelDensity{M,B,L,P}) where {M,B,L,P}
pvec = isPartial(mkd) ? mkd._partial : collect(1:length(bw))
println(io, " bws: ", getBandwidth(mkd, true) .|> x->round(x,digits=4))
println(io, " ipc: ", getInfoPerCoord(mkd, true) .|> x->round(x,digits=4))
print(io, " mean: ")
try
# mn = mean(mkd.manifold, getPoints(mkd, false))
mn = mean(mkd)
println(io, " mean: ", round.(mn',digits=4))
if mn isa ProductRepr
println(io)
for prt in mn.parts
println(io, " ", round.(prt,digits=4))
end
else
println(io, round.(mn',digits=4))
end
catch
println(io, "----")
end
println(io, ")")
nothing
Expand Down

0 comments on commit 3ac4a74

Please sign in to comment.