-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write numpy array to zarr with CompatCompressor #310
Comments
You should be able to use import zarr
import numpy as np
import kvikio
import kvikio.zarr
a = np.arange(20)
z = zarr.open(
"./tmp.zarr",
"w",
shape=a.shape,
dtype=a.dtype,
chunks=a.shape,
compressor=kvikio.zarr.CompatCompressor.lz4().cpu,
)
z[:] = a I have added an example of this in #312 |
Thanks! |
Another related issue, is it possible to write a zarr with |
You can also use |
Thanks. |
Hi, I am translating some of my numpy code to cupy. I used to store intermediate data to zarr with the default compressor and it works good. Since I want to use cupy now, using kvikio to accelerate the io is a good idea. But I can't translate all of them in short time. In some case, I need to do numpy processing and store the data and next read it directly to GPU memory with kvikio.zarr. What is the proper way to save numpy array to zarr with GPU compatible compressor?
I have tried to use
But I got
The text was updated successfully, but these errors were encountered: