Skip to content

Commit 8962559

Browse files
author
Raphael Sonabend
authored
Merge pull request #246 from alan-turing-institute/fix_vd_extract
Fix bug in vecdist
2 parents 8660ed3 + 474730d commit 8962559

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# distr6 1.5.2
2+
3+
* Fixed bug in extracting distributions from vector distributions
4+
15
# distr6 1.5.1
26

37
* Added `ids` active binding to more easily get ids of distributions in `VectorDistribution`

R/Wrapper_VectorDistribution.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,7 @@ or `distlist` should be used.")
11391139
if (length(i) == 1) {
11401140
id <- as.character(unlist(vecdist$modelTable[i, 2]))
11411141
pars <- vecdist$parameters()[paste0(id, "__")]$values()
1142-
shared_pars <- vecdist$.__enclos_env__$private$.sharedparams
1143-
pars <- pars[!(names(pars) %in% names(shared_pars))]
1142+
shared_pars <- vecdist$.__enclos_env__$private$.sharedparams
11441143
# construct with shared parameters (no conflicts should be possible here)
11451144
dist <- do.call(get(distribution)$new, c(shared_pars, list(decorators = decorators)))
11461145
do.call(dist$setParameterValue, c(resolveConflicts = TRUE, pars))

0 commit comments

Comments
 (0)