Skip to content

Commit

Permalink
Workaround for usage of MATLAB any() (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
wleoncio committed Aug 9, 2023
1 parent b75d38f commit bcdfc5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/indMix.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ indMix <- function(c, npops, counts = NULL, sumcounts = NULL, max_iter = 100L, d
while (ready != 1) {
iter <- iter + 1L
if (iter > max_iter) {
warning("max_iter reached. Stopping.")
warning("max_iter reached. Stopping prematurely.")
break
}
# FIXME: loop caught in here
Expand Down
2 changes: 1 addition & 1 deletion R/poistaTyhjatPopulaatiot.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
poistaTyhjatPopulaatiot <- function(npops) {
# % Poistaa tyhjentyneet populaatiot COUNTS:ista ja
# % SUMCOUNTS:ista. P�ivitt�� npops:in ja PARTITION:in.
notEmpty <- matlab2r::find(any(SUMCOUNTS, 2))
notEmpty <- matlab2r::find(apply(SUMCOUNTS, 1, function(x) any(x > 0)))
COUNTS <- COUNTS[, , notEmpty]
SUMCOUNTS <- SUMCOUNTS[notEmpty, ]
LOGDIFF <- LOGDIFF[, notEmpty]
Expand Down

0 comments on commit bcdfc5d

Please sign in to comment.