Hi,
When writing to a dense 3D TileDB array using bracket assignment ([<-), I get the following error:
Error: Subarray should have num_dims * 2 values: (low, high) for each dimension.
This was originally encountered through the TileDBArray Bioconductor package, but the error comes from the tiledb package's [<- method. I've also filed LTLA/TileDBArray#30.
Minimal reproducible example
library(tiledb)
# Create a dense 3D array
tmp <- tempfile()
dom <- tiledb_domain(dims = list(
tiledb_dim("d1", c(1L, 10L), 10L, type="INT32"),
tiledb_dim("d2", c(1L, 10L), 10L, type="INT32"),
tiledb_dim("d3", c(1L, 10L), 10L, type="INT32")
))
schema <- tiledb_array_schema(dom,
attrs=list(tiledb_attr("val", type="FLOAT64")),
sparse=FALSE)
tiledb_array_create(tmp, schema)
# Write using [<- : FAIL
arr <- tiledb_array(tmp, query_type="WRITE")
arr[1:10, 1:10, 1:10] <- array(runif(1000), dim=c(10,10,10))
#> Error: Subarray should have num_dims * 2 values: (low, high) for each
dimension.
tiledb_array_close(arr)
# Note: selected_ranges works as a workaround (per #259)
arr2 <- tiledb_array(tmp, query_type="WRITE")
selected_ranges(arr2) <- list(cbind(1L,10L), cbind(1L,10L), cbind(1L,10L))
# ... but not sure how to combine with value assignment
tiledb_array_close(arr2)
Context
I'm developing DelayedTensor, a Bioconductor package for out-of-core tensor arithmetic. We'd like to use TileDB as a storage backend (via TileDBArray) for 3D+ arrays. The [<- method works for 2D, and the sparse write path (via data.frame) works for 3D, so this seems specific to the dense subarray write path.
This appears to be the same issue as #259, which was closed as completed in 2021. However, the error still occurs with tiledb 0.34.0.
Session info
R version 4.5.3 (2026-03-11)
Platform: x86_64-conda-linux-gnu
tiledb 0.34.0
Hi,
When writing to a dense 3D TileDB array using bracket assignment (
[<-), I get the following error:Error: Subarray should have num_dims * 2 values: (low, high) for each dimension.
This was originally encountered through the
TileDBArrayBioconductor package, but the error comes from the tiledb package's[<-method. I've also filed LTLA/TileDBArray#30.Minimal reproducible example
Context
I'm developing
DelayedTensor, a Bioconductor package for out-of-core tensor arithmetic. We'd like to useTileDBas a storage backend (viaTileDBArray) for 3D+ arrays. The[<-method works for 2D, and the sparse write path (viadata.frame) works for 3D, so this seems specific to the dense subarray write path.This appears to be the same issue as #259, which was closed as completed in 2021. However, the error still occurs with
tiledb0.34.0.Session info