Last active
May 16, 2021 01:02
-
-
Save LTLA/47c0a1abb9efb6979d003b98bb5830a0 to your computer and use it in GitHub Desktop.
TileDB segfault script (mac only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tiledb) | |
dim <- c(500L, 200L) | |
context <- tiledb_ctx() | |
collected <- vector("list", length(dim)) | |
for (i in seq_along(dim)) { | |
collected[[i]] <- tiledb_dim(ctx=context, paste0("d", i), c(1L, dim[i]), tile=100L, type="INT32") | |
} | |
dom <- tiledb_domain(ctx=context, dims=collected) | |
val <- r_to_tiledb_type(numeric(0)) | |
schema <- tiledb_array_schema(ctx=context, dom, | |
sparse=FALSE, | |
attrs=list(tiledb_attr(ctx=context, "x", type=val))) | |
path <- tempfile() | |
tiledb_array_create(path, schema) | |
obj <- tiledb_array(path, attrs="x", query_type="WRITE") | |
obj[1:500, 1:200] <- matrix(runif(100000), 500, 200) |
Author
LTLA
commented
May 16, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment