Skip to content

Commit

Permalink
removed getindex overloads in nested_index testing
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Sep 6, 2023
1 parent dc7c675 commit e4d964e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/nested_indexing.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e4d964e

Please sign in to comment.