# 2. Tensor arithmetic by DelayedTensor

Authors: Koki Tsuyuzaki [aut, cre]
Last modified: 2026-05-28 06:13:42.906131
Compiled: Thu May 28 06:15:22 2026

# Setting

    suppressPackageStartupMessages(library("DelayedTensor"))

    ## Warning: multiple methods tables found for 'kronecker'

    suppressPackageStartupMessages(library("DelayedArray"))
    suppressPackageStartupMessages(library("HDF5Array"))
    suppressPackageStartupMessages(library("DelayedRandomArray"))

    darr1 <- RandomUnifArray(c(2,3,4))
    darr2 <- RandomUnifArray(c(2,3,4))

There are several settings in DelayedTensor.

First, the sparsity of the intermediate DelayedArray objects calculated inside DelayedTensor is set by `setSparse`.

Note that the sparse mode is experimental.

Whether it contributes to higher speed and lower memory is quite dependent on the sparsity of the DelayedArray, and the current implementation does not recognize the block size, which may cause out-of-memory errors, when the data is extremely huge.

Here, we specify `as.sparse` as `FALSE` (this is also the default value for now).

    DelayedTensor::setSparse(as.sparse=FALSE)

Next, the verbose message is suppressed by `setVerbose`. This is useful when we want to monitor the calculation process.

Here we specify `as.verbose` as `FALSE` (this is also the default value for now).

    DelayedTensor::setVerbose(as.verbose=FALSE)

The block size of block processing is specified by `setAutoBlockSize`. When the sparse mode is off, all the functions of DelayedTensor are performed as block processing, in which each block vector/matrix/tensor is expanded to memory space from on-disk file incrementally so as not to exceed the specified size.

Here, we specify the block size as `1E+8`.

    setAutoBlockSize(size=1E+8)

    ## automatic block size set to 1e+08 bytes (was 1e+08)

Finally, the temporal directory to store the intermediate HDF5 files during running DelayedTensor is specified by `setHDF5DumpDir`.

Note that in many systems the `/var` directory has the storage limitation, so if there is no enough space, user should specify the other directory.

    # tmpdir <- paste(sample(c(letters,1:9), 10), collapse="")
    # dir.create(tmpdir, recursive=TRUE))
    tmpdir <- tempdir()
    setHDF5DumpDir(tmpdir)

These specified values are also extracted by each getter function.

    DelayedTensor::getSparse()

    ## $delayedtensor.sparse
    ## [1] FALSE

    DelayedTensor::getVerbose()

    ## $delayedtensor.verbose
    ## [1] FALSE

    getAutoBlockSize()

    ## [1] 1e+08

    getHDF5DumpDir()

    ## [1] "/tmp/RtmpGAU58h"

# Tensor Arithmetic Operations

## Unfold/Fold Operations

Unfold (a.k.a. matricizing) operations are used to reshape a tensor into a matrix.

Figure 1: Unfold/Fold Operasions

In `unfold`, `row_idx` and `col_idx` are specified to set which modes are used as the row/column.

    dmat1 <- DelayedTensor::unfold(darr1, row_idx=c(1,2), col_idx=3)
    dmat1

    ## <6 x 4> HDF5Matrix object of type "double":
    ##            [,1]       [,2]       [,3]       [,4]
    ## [1,] 0.71883164 0.78251713 0.10326076 0.51083034
    ## [2,] 0.80181679 0.87971390 0.26151426 0.60345807
    ## [3,] 0.37570347 0.77375819 0.04052094 0.53184396
    ## [4,] 0.50862953 0.55203528 0.37072946 0.97182499
    ## [5,] 0.42738895 0.51577068 0.40712551 0.27589362
    ## [6,] 0.16216981 0.41252416 0.41042671 0.58088989

`fold` is the inverse operation of `unfold`, which is used to reshape a matrix into a tensor.

In `fold`, `row_idx`/`col_idx` are specified to set which modes correspond the row/column of the output tensor and `modes` is specified to set the mode of the output tensor.

    dmat1_to_darr1 <- DelayedTensor::fold(dmat1,
        row_idx=c(1,2), col_idx=3, modes=dim(darr1))
    dmat1_to_darr1

    ## <2 x 3 x 4> DelayedArray object of type "double":
    ## ,,1
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.7188316 0.3757035 0.4273890
    ## [2,] 0.8018168 0.5086295 0.1621698
    ##
    ## ,,2
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.7825171 0.7737582 0.5157707
    ## [2,] 0.8797139 0.5520353 0.4125242
    ##
    ## ,,3
    ##            [,1]       [,2]       [,3]
    ## [1,] 0.10326076 0.04052094 0.40712551
    ## [2,] 0.26151426 0.37072946 0.41042671
    ##
    ## ,,4
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.5108303 0.5318440 0.2758936
    ## [2,] 0.6034581 0.9718250 0.5808899

    identical(as.array(darr1), as.array(dmat1_to_darr1))

    ## [1] TRUE

There are some wrapper functions of `unfold` and `fold`.

For example, in `k_unfold`, mode `m` is used as the row, and the other modes are is used as the column.

`k_fold` is the inverse operation of `k_unfold`.

    dmat2 <- DelayedTensor::k_unfold(darr1, m=1)
    dmat2_to_darr1 <- k_fold(dmat2, m=1, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat2_to_darr1))

    ## [1] TRUE

    dmat3 <- DelayedTensor::k_unfold(darr1, m=2)
    dmat3_to_darr1 <- k_fold(dmat3, m=2, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat3_to_darr1))

    ## [1] TRUE

    dmat4 <- DelayedTensor::k_unfold(darr1, m=3)
    dmat4_to_darr1 <- k_fold(dmat4, m=3, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat4_to_darr1))

    ## [1] TRUE

In `rs_unfold`, mode `m` is used as the row, and the other modes are is used as the column.

`rs_fold` and `rs_unfold` also perform the same operations.

On the other hand, `cs_unfold` specifies the mode `m` as the column and the other modes are specified as the column.

`cs_fold` is the inverse operation of `cs_unfold`.

    dmat8 <- DelayedTensor::cs_unfold(darr1, m=1)
    dmat8_to_darr1 <- DelayedTensor::cs_fold(dmat8, m=1, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat8_to_darr1))

    ## [1] TRUE

    dmat9 <- DelayedTensor::cs_unfold(darr1, m=2)
    dmat9_to_darr1 <- DelayedTensor::cs_fold(dmat9, m=2, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat9_to_darr1))

    ## [1] TRUE

    dmat10 <- DelayedTensor::cs_unfold(darr1, m=3)
    dmat10_to_darr1 <- DelayedTensor::cs_fold(dmat10, m=3, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat10_to_darr1))

    ## [1] TRUE

In `matvec`, m=2 is specified as unfold.

`unmatvec` is the inverse operation of `matvec`.

    dmat11 <- DelayedTensor::matvec(darr1)
    dmat11_darr1 <- DelayedTensor::unmatvec(dmat11, modes=dim(darr1))
    identical(as.array(darr1), as.array(dmat11_darr1))

    ## [1] TRUE

`ttm` multiplies a tensor by a matrix.

`m` specifies in which mode the matrix will be multiplied.

    dmatZ <- RandomUnifArray(c(10,4))
    DelayedTensor::ttm(darr1, dmatZ, m=3)

    ## <2 x 3 x 10> DelayedArray object of type "double":
    ## ,,1
    ##          [,1]     [,2]     [,3]
    ## [1,] 1.380566 1.144368 1.120915
    ## [2,] 1.700268 1.784535 1.192499
    ##
    ## ,,2
    ##          [,1]     [,2]     [,3]
    ## [1,] 1.281453 1.222688 1.095639
    ## [2,] 1.595347 1.686577 1.249719
    ##
    ## ,,3
    ##          [,1]     [,2]     [,3]
    ## [1,] 1.647513 1.378282 1.260759
    ## [2,] 1.982498 1.899856 1.252159
    ##
    ## ...
    ##
    ## ,,8
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.2855445 0.1587878 0.3961451
    ## [2,] 0.4149266 0.4105703 0.3356375
    ##
    ## ,,9
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.7218464 0.5629175 0.4272912
    ## [2,] 0.8320450 0.9041164 0.4819591
    ##
    ## ,,10
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.6349952 0.5521270 0.6418657
    ## [2,] 0.8352207 0.9369424 0.7110924

`ttl` multiplies a tensor by multiple matrices.

`ms` specifies in which mode these matrices will be multiplied.

    dmatX <- RandomUnifArray(c(10,2))
    dmatY <- RandomUnifArray(c(10,3))
    dlizt <- list(dmatX = dmatX, dmatY = dmatY)
    DelayedTensor::ttl(darr1, dlizt, ms=c(1,2))

    ## <10 x 10 x 4> DelayedArray object of type "double":
    ## ,,1
    ##            [,1]      [,2]      [,3] ...      [,9]     [,10]
    ##  [1,] 0.7223081 1.2557637 1.4622115   . 0.5156185 1.2240454
    ##  [2,] 1.2137058 2.0831206 2.4351444   . 0.8739811 2.0459369
    ##   ...         .         .         .   .         .         .
    ##  [9,] 1.0537204 1.8020126 2.1088740   . 0.7606098 1.7736273
    ## [10,] 0.4775600 0.7952759 0.9384225   . 0.3507403 0.7952137
    ##
    ## ...
    ##
    ## ,,4
    ##            [,1]      [,2]      [,3] ...      [,9]     [,10]
    ##  [1,] 0.9547399 1.1806099 1.5504523   . 0.5791556 1.1386305
    ##  [2,] 1.7714358 2.1352629 2.8327710   . 1.0579403 2.0515347
    ##   ...         .         .         .   .         .         .
    ##  [9,] 1.5783639 1.8904344 2.5143944   . 0.9389906 1.8145529
    ## [10,] 0.8481596 0.9771152 1.3203316   . 0.4929208 0.9322450

## Vectorization

`vec` collapses a DelayedArray into a 1D DelayedArray (vector).

Figure 2: Vectorization

    DelayedTensor::vec(darr1)

    ## <24> HDF5Array object of type "double":
    ##       [1]       [2]       [3]         .      [23]      [24]
    ## 0.7188316 0.8018168 0.3757035         . 0.2758936 0.5808899

## Norm Operations

`fnorm` calculates the Frobenius norm of a DelayedArray.

Figure 3: Norm Operations

    DelayedTensor::fnorm(darr1)

    ## [1] 2.704185

`innerProd` calculates the inner product value of two DelayedArray.

    DelayedTensor::innerProd(darr1, darr2)

    ## [1] 5.640216

## Outer Product

Inner product multiplies two tensors and collapses to 0D tensor (norm). On the other hand, the outer product is an operation that leaves all subscripts intact.

Figure 4: Outer Product

    DelayedTensor::outerProd(darr1[,,1], darr2[,,1])

    ## <2 x 3 x 2 x 3> HDF5Array object of type "double":
    ## ,,1,1
    ##            [,1]       [,2]       [,3]
    ## [1,] 0.13797862 0.07211570 0.08203665
    ## [2,] 0.15390749 0.09763065 0.03112824
    ##
    ## ,,2,1
    ##            [,1]       [,2]       [,3]
    ## [1,] 0.09827511 0.05136432 0.05843050
    ## [2,] 0.10962042 0.06953731 0.02217105
    ##
    ## ,,1,2
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.3549110 0.1854972 0.2110161
    ## [2,] 0.3958835 0.2511272 0.0800686
    ##
    ## ,,2,2
    ##            [,1]       [,2]       [,3]
    ## [1,] 0.18961763 0.09910527 0.11273916
    ## [2,] 0.21150793 0.13416928 0.04277810
    ##
    ## ,,1,3
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.5145903 0.2689550 0.3059551
    ## [2,] 0.5739969 0.3641129 0.1160926
    ##
    ## ,,2,3
    ##            [,1]       [,2]       [,3]
    ## [1,] 0.11030091 0.05764971 0.06558057
    ## [2,] 0.12303454 0.07804651 0.02488410

## Diagonal Operations

Using `DelayedDiagonalArray`, we can originally create a diagonal DelayedArray by specifying the dimensions (modes) and the values.

Figure 5: Diagonal Operations

    dgdarr <- DelayedTensor::DelayedDiagonalArray(c(5,6,7), 1:5)
    dgdarr

    ## <5 x 6 x 7> sparse DelayedArray object of type "integer":
    ## ,,1
    ##      [,1] [,2] [,3] [,4] [,5] [,6]
    ## [1,]    1    0    0    0    0    0
    ## [2,]    0    0    0    0    0    0
    ## [3,]    0    0    0    0    0    0
    ## [4,]    0    0    0    0    0    0
    ## [5,]    0    0    0    0    0    0
    ##
    ## ...
    ##
    ## ,,7
    ##      [,1] [,2] [,3] [,4] [,5] [,6]
    ## [1,]    0    0    0    0    0    0
    ## [2,]    0    0    0    0    0    0
    ## [3,]    0    0    0    0    0    0
    ## [4,]    0    0    0    0    0    0
    ## [5,]    0    0    0    0    0    0

Similar to the `diag` of the base package, the `diag` of DelayedTensor is used to extract and assign values to DelayedArray.

    DelayedTensor::diag(dgdarr)

    ## <5> DelayedArray object of type "integer":
    ## [1] [2] [3] [4] [5]
    ##   1   2   3   4   5

    DelayedTensor::diag(dgdarr) <- c(1111, 2222, 3333, 4444, 5555)
    DelayedTensor::diag(dgdarr)

    ## <5> DelayedArray object of type "double":
    ##  [1]  [2]  [3]  [4]  [5]
    ## 1111 2222 3333 4444 5555

## Mode-wise Operations

`modeSum` calculates the summation for a given mode `m` of a DelayedArray. The mode specified as `m` is collapsed into 1D as follows.

Figure 6: Mode-wise Operations

    DelayedTensor::modeSum(darr1, m=1)

    ## <1 x 3 x 4> DelayedArray object of type "double":
    ## ,,1
    ##           [,1]      [,2]      [,3]
    ## [1,] 1.5206484 0.8843330 0.5895588
    ##
    ## ,,2
    ##           [,1]      [,2]      [,3]
    ## [1,] 1.6622310 1.3257935 0.9282948
    ##
    ## ,,3
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.3647750 0.4112504 0.8175522
    ##
    ## ,,4
    ##           [,1]      [,2]      [,3]
    ## [1,] 1.1142884 1.5036690 0.8567835

    DelayedTensor::modeSum(darr1, m=2)

    ## <2 x 1 x 4> DelayedArray object of type "double":
    ## ,,1
    ##          [,1]
    ## [1,] 1.521924
    ## [2,] 1.472616
    ##
    ## ,,2
    ##          [,1]
    ## [1,] 2.072046
    ## [2,] 1.844273
    ##
    ## ,,3
    ##           [,1]
    ## [1,] 0.5509072
    ## [2,] 1.0426704
    ##
    ## ,,4
    ##          [,1]
    ## [1,] 1.318568
    ## [2,] 2.156173

    DelayedTensor::modeSum(darr1, m=3)

    ## <2 x 3 x 1> DelayedArray object of type "double":
    ## ,,1
    ##          [,1]     [,2]     [,3]
    ## [1,] 2.115440 1.721827 1.626179
    ## [2,] 2.546503 2.403219 1.566011

Similar to `modeSum`, `modeMean` calculates the average value for a given mode `m` of a DelayedArray.

    DelayedTensor::modeMean(darr1, m=1)

    ## <1 x 3 x 4> DelayedArray object of type "double":
    ## ,,1
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.7603242 0.4421665 0.2947794
    ##
    ## ,,2
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.8311155 0.6628967 0.4641474
    ##
    ## ,,3
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.1823875 0.2056252 0.4087761
    ##
    ## ,,4
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.5571442 0.7518345 0.4283918

    DelayedTensor::modeMean(darr1, m=2)

    ## <2 x 1 x 4> DelayedArray object of type "double":
    ## ,,1
    ##          [,1]
    ## [1,] 0.507308
    ## [2,] 0.490872
    ##
    ## ,,2
    ##           [,1]
    ## [1,] 0.6906820
    ## [2,] 0.6147578
    ##
    ## ,,3
    ##           [,1]
    ## [1,] 0.1836357
    ## [2,] 0.3475568
    ##
    ## ,,4
    ##           [,1]
    ## [1,] 0.4395226
    ## [2,] 0.7187243

    DelayedTensor::modeMean(darr1, m=3)

    ## <2 x 3 x 1> DelayedArray object of type "double":
    ## ,,1
    ##           [,1]      [,2]      [,3]
    ## [1,] 0.5288600 0.4304566 0.4065447
    ## [2,] 0.6366258 0.6008048 0.3915026

## Tensor Product Operations

There are some tensor specific product such as Hadamard product, Kronecker product, and Khatri-Rao product.

### Hadamard Product

Suppose a tensor \(A \in \Re ^{I \times J}\) and a tensor \(B \in \Re ^{I \times J}\).

Hadamard product is defined as the element-wise product of \(A\) and \(B\).

Figure 7: Hadamard Product

Hadamard product can be extended to higher-order tensors.

\[ A \circ B = \begin{bmatrix} a_{11}b_{11} & a_{12}b_{12} & \cdots & a_{1J}b_{1J} \\ a_{21}b_{21} & a_{22}b_{22} & \cdots & a_{2J}b_{2J} \\ \vdots & \vdots & \ddots & \vdots \\ a_{I1}b_{I1} & a_{I2}b_{I2} & \cdots & a_{IJ}b_{IJ} \\ \end{bmatrix} \]

`hadamard` calculates Hadamard product of two DelayedArray objects.

    prod_h <- DelayedTensor::hadamard(darr1, darr2)
    dim(prod_h)

    ## [1] 2 3 4

`hadamard_list` calculates Hadamard product of multiple DelayedArray objects.

    prod_hl <- DelayedTensor::hadamard_list(list(darr1, darr2))
    dim(prod_hl)

    ## [1] 2 3 4

### Kronecker Product

Suppose a tensor \(A \in \Re ^{I \times J}\) and a tensor \(B \in \Re ^{K \times L}\).

Kronecker product is defined as all the possible combination of element-wise product and the dimensions of output tensor are \({IK \times JL}\).

Figure 8: Kronecker Product

Kronecker product can be extended to higher-order tensors.

\[ A \otimes B = \begin{bmatrix} a_{11}B & a_{12}B & \cdots & a_{1J}B \\ a_{21}B & a_{22}B & \cdots & a_{2J}B \\ \vdots & \vdots & \ddots & \vdots \\ a_{I1}B & a_{I2}B & \cdots & a_{IJ}B \\ \end{bmatrix} \]

`kronecker` calculates Kronecker product of two DelayedArray objects.

    prod_kron <- DelayedTensor::kronecker(darr1, darr2)
    dim(prod_kron)

    ## [1]  4  9 16

`kronecker_list` calculates Kronecker product of multiple DelayedArray objects.

    prod_kronl <- DelayedTensor::kronecker_list(list(darr1, darr2))
    dim(prod_kronl)

    ## [1]  4  9 16

### Khatri-Rao Product

Suppose a tensor \(A \in \Re ^{I \times J}\) and a tensor \(B \in \Re ^{K \times J}\).

Khatri-Rao product is defined as the column-wise Kronecker product and the dimensions of output tensor is \({IK \times J}\).

\[ A \odot B = \begin{bmatrix} a_{1} \otimes a_{1} & a_{2} \otimes a_{2} & \cdots & a_{J} \otimes a_{J} \\ \end{bmatrix} \]

Figure 9: Khatri-Rao Product

Khatri-Rao product can only be used for 2D tensors (matrices).

`khatri_rao` calculates Khatri-Rao product of two DelayedArray objects.

    prod_kr <- DelayedTensor::khatri_rao(darr1[,,1], darr2[,,1])
    dim(prod_kr)

    ## [1] 4 3

`khatri_rao_list` calculates Khatri-Rao product of multiple DelayedArray objects.

    prod_krl <- DelayedTensor::khatri_rao_list(list(darr1[,,1], darr2[,,1]))
    dim(prod_krl)

    ## [1] 4 3

## Utilities Functions

`list_rep` replicates an arbitrary number of any R object.

    str(DelayedTensor::list_rep(darr1, 3))

    ## List of 3
    ##  $ :Formal class 'RandomUnifArray' [package "DelayedRandomArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'RandomUnifArraySeed' [package "DelayedRandomArray"] with 6 slots
    ##   .. .. .. ..@ min     : num 0
    ##   .. .. .. ..@ max     : num 1
    ##   .. .. .. ..@ dim     : int [1:3] 2 3 4
    ##   .. .. .. ..@ chunkdim: int [1:3] 2 3 4
    ##   .. .. .. ..@ seeds   :List of 1
    ##   .. .. .. .. ..$ : int [1:2] -466186034 1934214641
    ##   .. .. .. ..@ sparse  : logi FALSE
    ##  $ :Formal class 'RandomUnifArray' [package "DelayedRandomArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'RandomUnifArraySeed' [package "DelayedRandomArray"] with 6 slots
    ##   .. .. .. ..@ min     : num 0
    ##   .. .. .. ..@ max     : num 1
    ##   .. .. .. ..@ dim     : int [1:3] 2 3 4
    ##   .. .. .. ..@ chunkdim: int [1:3] 2 3 4
    ##   .. .. .. ..@ seeds   :List of 1
    ##   .. .. .. .. ..$ : int [1:2] -466186034 1934214641
    ##   .. .. .. ..@ sparse  : logi FALSE
    ##  $ :Formal class 'RandomUnifArray' [package "DelayedRandomArray"] with 1 slot
    ##   .. ..@ seed:Formal class 'RandomUnifArraySeed' [package "DelayedRandomArray"] with 6 slots
    ##   .. .. .. ..@ min     : num 0
    ##   .. .. .. ..@ max     : num 1
    ##   .. .. .. ..@ dim     : int [1:3] 2 3 4
    ##   .. .. .. ..@ chunkdim: int [1:3] 2 3 4
    ##   .. .. .. ..@ seeds   :List of 1
    ##   .. .. .. .. ..$ : int [1:2] -466186034 1934214641
    ##   .. .. .. ..@ sparse  : logi FALSE

### Bind Operations

`modebind_list` collapses multiple DelayedArray objects into single DelayedArray object.

`m` specifies the collapsed dimension.

Figure 10: Bind Operations

    dim(DelayedTensor::modebind_list(list(darr1, darr2), m=1))

    ## [1] 4 3 4

    dim(DelayedTensor::modebind_list(list(darr1, darr2), m=2))

    ## [1] 2 6 4

    dim(DelayedTensor::modebind_list(list(darr1, darr2), m=3))

    ## [1] 2 3 8

`rbind_list` is the row-wise `modebind_list` and collapses multiple 2D DelayedArray objects into single DelayedArray object.

    dim(DelayedTensor::rbind_list(list(darr1[,,1], darr2[,,1])))

    ## [1] 4 3

`cbind_list` is the column-wise `modebind_list` and collapses multiple 2D DelayedArray objects into single DelayedArray object.

    dim(DelayedTensor::cbind_list(list(darr1[,,1], darr2[,,1])))

    ## [1] 2 6

# Session information

    ## R version 4.6.0 (2026-04-24)
    ## Platform: x86_64-pc-linux-gnu
    ## Running under: Ubuntu 24.04.4 LTS
    ##
    ## Matrix products: default
    ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
    ## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.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: Etc/UTC
    ## tzcode source: system (glibc)
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] DelayedRandomArray_1.21.0 HDF5Array_1.41.0
    ##  [3] h5mread_1.5.0             rhdf5_2.57.1
    ##  [5] DelayedArray_0.39.3       SparseArray_1.13.2
    ##  [7] S4Arrays_1.13.0           abind_1.4-8
    ##  [9] IRanges_2.47.2            S4Vectors_0.51.3
    ## [11] MatrixGenerics_1.25.0     matrixStats_1.5.0
    ## [13] BiocGenerics_0.59.6       generics_0.1.4
    ## [15] Matrix_1.7-5              DelayedTensor_1.19.0
    ## [17] BiocStyle_2.41.0
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] dqrng_0.4.1         sass_0.4.10         lattice_0.22-9
    ##  [4] digest_0.6.39       evaluate_1.0.5      grid_4.6.0
    ##  [7] fastmap_1.2.0       jsonlite_2.0.0      BiocManager_1.30.27
    ## [10] codetools_0.2-20    jquerylib_0.1.4     cli_3.6.6
    ## [13] rlang_1.2.0         XVector_0.53.0      cachem_1.1.0
    ## [16] yaml_2.3.12         tools_4.6.0         beachmat_2.29.0
    ## [19] parallel_4.6.0      BiocParallel_1.47.0 einsum_0.1.2
    ## [22] Rhdf5lib_2.1.0      rsvd_1.0.5          buildtools_1.0.0
    ## [25] R6_2.6.1            lifecycle_1.0.5     BiocSingular_1.29.0
    ## [28] irlba_2.3.7         ScaledMatrix_1.21.0 rTensor_1.5.0
    ## [31] bslib_0.11.0        Rcpp_1.1.1-1.1      xfun_0.57
    ## [34] sys_3.4.3           knitr_1.51          rhdf5filters_1.25.0
    ## [37] htmltools_0.5.9     rmarkdown_2.31      maketools_1.3.2
    ## [40] compiler_4.6.0