From e4d964e1d3d9c57b875a5228a60fb32affd35dd0 Mon Sep 17 00:00:00 2001 From: Tor Erlend Fjelde Date: Wed, 6 Sep 2023 07:48:23 +0100 Subject: [PATCH] removed getindex overloads in nested_index testing --- test/nested_indexing.jl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/nested_indexing.jl b/test/nested_indexing.jl index cb9cb2e5e..2a8b45b9b 100644 --- a/test/nested_indexing.jl +++ b/test/nested_indexing.jl @@ -1,13 +1,3 @@ -# HACK: Don't do this. -function Base.getindex(c::MCMCChains.Chains, vn::VarName) - DynamicPPL.supports_varname_indexing(c) || error("Chains do not support indexing using $vn.") - return c[:, c.info.varname_to_symbol[vn], :] -end -function Base.getindex(c::MCMCChains.Chains, vns::AbstractVector{<:VarName}) - DynamicPPL.supports_varname_indexing(c) || error("Chains do not support indexing using $vn.") - return c[:, map(Base.Fix1(getindex, c.info.varname_to_symbol), vns), :] -end - @testset "generated_quantities" begin n = 10 d = 2