Open Artur-man opened 1 month ago
This doesn't seem to be the case with other sizes:
mat <- array(rep("text", 100*100), dim = c(100, 100))
zarr.array <- pizzarr::zarr_open(store = "data/string_test.zarr", mode = "w")
zarr.array$create_dataset(name = "assay", data = mat, shape = dim(mat), dtype = "<S20")
<ZarrArray>
Public:
[: function (...)
[<-: function (...)
append: function (data, axis = 0)
Also the problem doesn't occur with numeric arrays:
mat <- array(sample(1:20, 545*689, replace = TRUE), dim = c(545, 689))
zarr.array <- pizzarr::zarr_open(store = "data/pizzarr_test.zarr", mode = "w")
zarr.array$create_dataset(name = "assay", data = mat, shape = dim(mat))
<ZarrArray>
Public:
[: function (...)
[<-: function (...)
append: function (data, axis = 0)
Describe the bug
There seems to be an error when writing zarr arrays with character elements and arbitrary shape. I traced it here by debugging but couldn't really figure out:
https://github.com/keller-mark/pizzarr/blob/f84355d2708c22dc6e703f3cdd83d218221b352a/R/zarr-array.R#L633-L648
To Reproduce
Error
Environment: