We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9086c46 commit 3bb6965Copy full SHA for 3bb6965
test/posteriorstats.jl
@@ -4,6 +4,7 @@ using InferenceObjects
4
using PosteriorStats
5
using Statistics
6
using StatsBase
7
+using Tables
8
using Test
9
10
_as_array(x) = fill(x)
@@ -262,9 +263,10 @@ _as_array(x::AbstractArray) = x
262
263
264
stats = @inferred SummaryStats summarize(data, mean, std; name="Stats")
265
@test stats.name == "Stats"
- @test stats[:label] == var_names
266
- @test stats[:mean] ≈ map(mean, slices)
267
- @test stats[:std] ≈ map(std, slices)
+ stats_nt = Tables.columntable(stats)
+ @test stats_nt.label == var_names
268
+ @test stats_nt.mean ≈ map(mean, slices)
269
+ @test stats_nt.std ≈ map(std, slices)
270
271
stats_def = summarize(arr; var_names)
272
@test summarize(data) == stats_def
0 commit comments