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:
mat <- array(rep("text", 545*689), dim = c(545, 689))
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")
Error in buf[offset_i_start:offset_i_stop] <- raw_vec_i :
replacement has length zero
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: