Skip to content

How to store on disk an in-memory zarr #100

@mratsim

Description

@mratsim

Hi alimanfoo,

Great work on your library. I have a library (vtk for medical image visualization) that outputs a 3D numpy array.
I want to store it on disk however it doesn't seem like there is a "convert", "save" or export function.

I tried using the following as well:
data is a 3d numpy array
outFile is path/to/my/image.zarr

z = zarr.array(data,
    **path=outFile**, dtype='int16',
    chunks=(100, 100, 100), compression='blosc', compression_opts=dict(cname='zstd'))

I get no error, z is created in memory, but nothing on disk.

For reference bcolz has a rootdir parameter that seems to be able to do what I want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements to the documentationrelease notes doneAutomatically applied to PRs which have release notes.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions