Skip to content

Commit 338ed05

Browse files
committed
Add deleteat!
1 parent 08efebb commit 338ed05

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/PhyloModels.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import
1616
Base.getindex,
1717
Base.rand,
1818
Base.copy,
19+
Base.deleteat!,
1920
StatsBase.loglikelihood
2021

2122
export

src/sandbox.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ function append!(trace1::PhyloTrace, trace2::PhyloTrace)
2929
end
3030

3131

32+
function deleteat!(trace::PhyloTrace, inds)
33+
deleteat!(trace.substitutionmodel, inds)
34+
deleteat!(trace.tree, inds)
35+
deleteat!(trace.logposterior, inds)
36+
return trace
37+
end
38+
39+
3240
function length(x::PhyloTrace)
3341
return length(x.substitutionmodel)
3442
end

0 commit comments

Comments
 (0)