Skip to content

Commit c1d666c

Browse files
committed
update README.md example
1 parent b179fb8 commit c1d666c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Group hierarchy = Group.open(
1717
new HttpStore("https://static.webknossos.org/data/zarr_v3")
1818
.resolve("l4_sample")
1919
);
20-
Array array = hierarchy.get("color").get("1");
20+
Group color = (Group) hierarchy.get("color");
21+
Array array = (Array) color.get("1");
2122
ucar.ma2.Array outArray = array.read(
2223
new long[]{0, 3073, 3073, 513}, // offset
2324
new int[]{1, 64, 64, 64} // shape
@@ -31,11 +32,12 @@ Array array = Array.create(
3132
.withChunkShape(1, 1024, 1024, 1024)
3233
.withFillValue(0)
3334
.withCodecs(c -> c.withSharding(new int[]{1, 32, 32, 32}, c1 -> c1.withBlosc()))
34-
.build();
35+
.build()
3536
);
37+
ucar.ma2.Array data = ucar.ma2.Array.factory(ucar.ma2.DataType.UINT, new int[]{1, 1024, 1024, 1024});
3638
array.write(
3739
new long[]{0, 0, 0, 0}, // offset
38-
ucar.ma2.Array.factory(ucar.ma2.DataType.UINT, new int[]{1, 1024, 1024, 1024})
40+
data
3941
);
4042
```
4143
## Development Start-Guide

0 commit comments

Comments
 (0)