Closed svilupp closed 1 year ago
ERROR: The number of lines in row_names must match the number of lines in the matrix.
row_names
All show() methods in ParetoSmooth (for PSISResult and ModelComparison) throw the above errors on the latest version ParetoSmooth
Example
loglikelihoods1 = rand(100, 100, 4); loo1 = psis_loo(loglikelihoods1) ERROR: The number of lines in row_names must match the number of lines in the matrix.
loglikelihoods1 = rand(100, 100, 4); loo1 = psis_loo(loglikelihoods1)
Root cause
pretty_table(psis_result)
size(data)
psis_result.data
Solution
Environment
(ParetoSmooth) pkg> st Project ParetoSmooth v0.7.1 Status ~/Documents/GitHub/ParetoSmooth.jl/Project.toml ⌅ [94b1ba4f] AxisKeys v0.1.25 [2ab3a3ac] LogExpFunctions v0.3.18 [be115224] MCMCDiagnosticTools v0.1.5 ⌅ [356022a1] NamedDims v0.2.50 ⌅ [08abe8d2] PrettyTables v1.3.1 [ae029012] Requires v1.3.0 [2913bbd2] StatsBase v0.33.21 [bc48ee85] Tullio v0.3.5 [b77e0a4c] InteractiveUtils [37e2e46d] LinearAlgebra [de0858da] Printf [9a3f8284] Random [10745b16] Statistics
~/Documents/GitHub/ParetoSmooth.jl/Project.toml
System
(ParetoSmooth.jl) julia> versioninfo() Julia Version 1.8.0 Commit 5544a0fab76 (2022-08-17 13:38 UTC) Platform Info: OS: macOS (arm64-apple-darwin21.3.0) CPU: 8 × Apple M1 Pro WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1) Threads: 8 on 6 virtual cores Environment: JULIA_EDITOR = nvim JULIA_NUM_THREADS = 8
ERROR: The number of lines in
row_names
must match the number of lines in the matrix.All show() methods in ParetoSmooth (for PSISResult and ModelComparison) throw the above errors on the latest version ParetoSmooth
Example
Root cause
pretty_table(psis_result)
checks dimensions and itssize(data)
call sees the flatten table, not the Matrix 3x4psis_result.data
to pretty_table() call, as it sees the right Matrix (not flattened)Solution
Environment
System