You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see after the unnaming, I don't recover my ReloadedMatrix class, which has some consequences for correct dispatch (e.g., see broken celldex build).
The root cause is the DelayedArray,DelayedOps-method. This first simplifies the seed to remove the opposing dimnames operations, leaving a ReloadedArraySeed, so far so good. However, because ReloadedArraySeed now inherits from DelayedOps, the code decides to call the new_DelayedArray() function instead of DelayedArray(). This bypasses my DelayedArray method for ReloadedArraySeed, leading to the incorrect class being returned.
I can see that the if condition is necessary to avoid infinite recursion, so a "simple" fix might be to check whether a DelayedArray method exists for the seed that is not the DelayedOps method:
# seed is simplified at this point.FUN<- selectMethod("DelayedArray", class(seed))
if (FUN@defined@.Data!="DelayedOps") {
return(FUN(seed))
}
Or some kind of logic like that.
Session information
R Under development (unstable) (2024-10-31 r87278)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.5 LTS
Matrix products: default
BLAS: /home/luna/Software/R/trunk/lib/libRblas.so
LAPACK: /home/luna/Software/R/trunk/lib/libRlapack.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Los_Angeles
tzcode source: system (glibc)
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] alabaster.matrix_1.7.4 alabaster.base_1.7.2 HDF5Array_1.35.2
[4] rhdf5_2.51.1 DelayedArray_0.33.3 SparseArray_1.7.2
[7] S4Arrays_1.7.1 IRanges_2.41.2 abind_1.4-8
[10] S4Vectors_0.45.2 MatrixGenerics_1.19.0 matrixStats_1.4.1
[13] BiocGenerics_0.53.3 generics_0.1.3 Matrix_1.7-1
loaded via a namespace (and not attached):
[1] zlibbioc_1.53.0 lattice_0.22-6 rhdf5filters_1.19.0
[4] XVector_0.47.0 Rhdf5lib_1.29.0 grid_4.5.0
[7] compiler_4.5.0 tools_4.5.0 alabaster.schemas_1.7.0
[10] Rcpp_1.0.13-1 jsonlite_1.8.9 crayon_1.5.3
The text was updated successfully, but these errors were encountered:
Another side-effect from #119 -
unname()
doesn't restore thematrixClass
of myReloadedArray
:You can see after the unnaming, I don't recover my
ReloadedMatrix
class, which has some consequences for correct dispatch (e.g., see broken celldex build).The root cause is the
DelayedArray,DelayedOps-method
. This first simplifies the seed to remove the opposing dimnames operations, leaving aReloadedArraySeed
, so far so good. However, becauseReloadedArraySeed
now inherits fromDelayedOps
, the code decides to call thenew_DelayedArray()
function instead ofDelayedArray()
. This bypasses myDelayedArray
method forReloadedArraySeed
, leading to the incorrect class being returned.I can see that the
if
condition is necessary to avoid infinite recursion, so a "simple" fix might be to check whether aDelayedArray
method exists for the seed that is not theDelayedOps
method:Or some kind of logic like that.
Session information
The text was updated successfully, but these errors were encountered: