Skip to content

Commit

Permalink
Forward extract_sparse_array() call to the WrapperArraySeed's seed.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 29, 2024
1 parent 12fe120 commit cc91cee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: alabaster.matrix
Title: Load and Save Artifacts from File
Version: 1.5.1
Date: 2024-05-22
Version: 1.5.2
Date: 2024-05-28
Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="[email protected]")
License: MIT + file LICENSE
Description:
Expand Down
5 changes: 5 additions & 0 deletions R/WrapperArraySeed.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#' path,WrapperArraySeed-method
#' is_sparse,WrapperArraySeed-method
#' extract_array,WrapperArraySeed-method
#' extract_sparse_array,WrapperArraySeed-method
#' OLD_extract_sparse_array,WrapperArraySeed-method
#' WrapperArray-class
#' coerce,WrapperArray,dgCMatrix-method
Expand Down Expand Up @@ -64,6 +65,10 @@ setMethod("is_sparse", "WrapperArraySeed", function(x) callGeneric(x@seed))
#' @importFrom DelayedArray extract_array
setMethod("extract_array", "WrapperArraySeed", function(x, index) callGeneric(x@seed, index))

#' @export
#' @importFrom SparseArray extract_sparse_array
setMethod("extract_sparse_array", "WrapperArraySeed", function(x, index) callGeneric(x@seed, index))

#' @export
#' @importFrom DelayedArray OLD_extract_sparse_array
setMethod("OLD_extract_sparse_array", "WrapperArraySeed", function(x, index) callGeneric(x@seed, index))
Expand Down
2 changes: 2 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
\section{Version 1.6.0}{\itemize{
\item Support the SVT_SparseMatrix version 1 class definition in \code{saveObject}.
However, note that this was not implemented for the soft-deprecated \code{writeSparseMatrix}, which now errors if such objects are passed in.

\item Added a \code{extract_sparse_array()} method for the \code{WrapperArraySeed} class, for some future-proofing when the seeds eventually make the switch.
}}
1 change: 1 addition & 0 deletions man/WrapperArraySeed.Rd

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

0 comments on commit cc91cee

Please sign in to comment.