Open ondave opened 3 weeks ago
Cookbook docs out of date? Args for zarr.create are different from @zarrita/core docs.
https://zarrita.dev/cookbook.html#create-an-array
import * as zarr from "zarrita"; import { FileSystemStore } from "@zarrita/storage"; const store = new FileSystemStore("tempstore"); const arr = await zarr.create(store, { shape: [10, 10], chunks: [5, 5], dtype: "int32", }); arr; // zarr.Array<"int32", FileSystemStore>
https://zarrita.dev/packages/core.html#create-an-array-or-group
import * as zarr from "@zarrita/core"; let root = zarr.root(new Map()); let grp = await zarr.create(root); let arr = await zarr.create(root.resolve("foo"), { data_type: "int32", shape: [4, 4], chunk_shape: [2, 2], }); console.log(root.store); // Map(2) { // '/zarr.json' => Uint8Array(66) [ ... ], // '/foo/zarr.json' => Uint8Array(392) [ ... ], // }
Thanks for pointing this out. The snake_case usage is correct, although before making a non- prerelease release we want to migrate to camelCase for all public APIs.
snake_case
camelCase
Cookbook docs out of date? Args for zarr.create are different from @zarrita/core docs.
https://zarrita.dev/cookbook.html#create-an-array
https://zarrita.dev/packages/core.html#create-an-array-or-group