vec_restore.vctrs_rray <- function(x, to, ..., i = NULL) {
# Use the much faster default restore method if the inner types
# are the same. Otherwise we have to go through the constructor
# to get the correct type specific `class` restored
if (typeof(x) == typeof(to)) {
return(NextMethod())
}
x_dim <- rray_dim(x)
new_rray(
.data = vec_data(x),
size = x_dim[1],
shape = x_dim[-1],
dim_names = rray_dim_names(x)
)
}
will require a change to rray_full_like() to just add empty dim names
will require a change to
rray_full_like()
to just add empty dim names