Skip to content

Commit

Permalink
remove array auto-splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
mschubert committed Feb 6, 2025
1 parent 78dc563 commit 6c17b8f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Depends:
LinkingTo: Rcpp
Imports:
methods,
narray,
globals,
progress,
R6,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# git head

* Fix a bug where `BiocGenerics` could break template filling (#337)
* Long deprecated automatic array splitting in `Q` has been removed

# clustermq 0.9.6

* Large common data size is now reported correctly (#336)
Expand Down
16 changes: 3 additions & 13 deletions R/Q.r
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#' @param n_jobs The number of jobs to submit; upper limit of jobs if job_size
#' is given as well
#' @param job_size The number of function calls per job
#' @param split_array_by The dimension number to split any arrays in `...`; default: last
#' @param rettype Return type of function call (vector type or 'list')
#' @param fail_on_error If an error occurs on the workers, continue or fail?
#' @param workers Optional instance of QSys representing a worker pool
Expand All @@ -38,19 +37,10 @@
#' }
Q = function(fun, ..., const=list(), export=list(), pkgs=c(), seed=128965,
memory=NULL, template=list(), n_jobs=NULL, job_size=NULL,
split_array_by=-1, rettype="list", fail_on_error=TRUE, workers=NULL,
log_worker=FALSE, chunk_size=NA, timeout=Inf, max_calls_worker=Inf,
verbose=TRUE) {
rettype="list", fail_on_error=TRUE, workers=NULL, log_worker=FALSE,
chunk_size=NA, timeout=Inf, max_calls_worker=Inf, verbose=TRUE) {

split_arrays = function(x) {
if (is.array(x)) {
.Deprecated("narray package directly")
narray::split(x, along=split_array_by)
} else
x
}
iter = lapply(list(...), split_arrays)
df = check_args(fun, iter, const)
df = check_args(fun, list(...), const)

Q_rows(fun = fun,
df = df,
Expand Down
3 changes: 0 additions & 3 deletions man/Q.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c17b8f

Please sign in to comment.