Skip to content

Commit 31aa7cb

Browse files
committed
editing
1 parent a4a600e commit 31aa7cb

File tree

4 files changed

+103
-26
lines changed

4 files changed

+103
-26
lines changed
340 KB
Loading
2.16 MB
Loading
625 KB
Loading

slides/scipy-2019.md

Lines changed: 103 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ These slides: @@TODO URL
99

1010
====
1111

12-
@@TODO mosquito image
12+
<p class="stretch"><img src="scipy-2019-files/malaria.png"></p>
1313

1414
====
1515

@@ -40,8 +40,8 @@ memory.
4040

4141
<p class="stretch"><img src="scipy-2019-files/compute2.png"></p>
4242

43-
Some part of the computation can be parallelised by processing data in
44-
chunks.
43+
At least some part of the computation can be parallelised by
44+
processing data in chunks.
4545

4646
===
4747

@@ -475,7 +475,7 @@ example.zarr
475475
### ZipStore
476476

477477
```bash
478-
$ cd example.zarr && zip -r0v ../example.zip ./*
478+
$ cd example.zarr && zip -r0 ../example.zip ./*
479479
```
480480

481481
```python
@@ -565,7 +565,7 @@ class ZipStore(MutableMapping):
565565
* Both multi-thread and multi-process parallelism are supported
566566
* GIL is released during critical sections (compression and decompression)
567567

568-
<small>* depending on the store</small>
568+
<small>* Depending on the store.</small>
569569

570570
===
571571

@@ -612,7 +612,7 @@ See docs for `da.from_array`, `da.from_zarr`, `da.to_zarr`. @@TODO links
612612
* If each writer is writing to a different region of an array, and
613613
writes are **not aligned** with chunk boundaries, then locking **is
614614
required** to avoid contention and/or data loss.
615-
615+
616616
===
617617

618618
### Write locks?
@@ -641,51 +641,128 @@ See docs for `da.from_array`, `da.from_zarr`, `da.to_zarr`. @@TODO links
641641

642642
### Available compressors (via numcodecs)
643643

644-
@@TODO
644+
Blosc, Zstandard, LZ4, Zlib, BZ2, LZMA, ...
645+
646+
```python
647+
import zarr
648+
from numcodecs import Blosc
649+
650+
store = zarr.DirectoryStore('example.zarr')
651+
root = zarr.group(store)
652+
compressor = Blosc(cname='zstd', clevel=1, shuffle=Blosc.BITSHUFFLE)
653+
big2 = root.zeros('big2',
654+
shape=(100_000_000, 100_000_000),
655+
chunks=(10_000, 10_000),
656+
dtype='i4',
657+
compressor=compressor)
658+
```
659+
660+
@@TODO check this works
645661

646662
===
647663

648664
### Compressor (codec) interface
649665

650-
@@TODO
666+
<p class="stretch">
667+
<img src="scipy-2019-files/codec-api.png" style="float: right">
668+
The numcodecs Codec interface defines the API for filters and compressors for use with Zarr. Built around the Python buffer protocol.
669+
</p>
670+
671+
@@TODO link to buffer protocol
651672

652673
===
653674

654-
### E.g., zlib implementation
675+
```python
676+
class Zlib(Codec):
677+
678+
def __init__(self, level=1):
679+
self.level = level
655680

656-
@@TODO
681+
def encode(self, buf):
682+
683+
# normalise inputs
684+
buf = ensure_contiguous_ndarray(buf)
685+
686+
# do compression
687+
return _zlib.compress(buf, self.level)
688+
689+
def decode(self, buf, out=None):
690+
691+
# normalise inputs
692+
buf = ensure_contiguous_ndarray(buf)
693+
if out is not None:
694+
out = ensure_contiguous_ndarray(out)
695+
696+
# do decompression
697+
dec = _zlib.decompress(buf)
698+
699+
return ndarray_copy(dec, out)
700+
701+
```
657702

658703
====
659704

660705
## Zarr specification
661706

662-
@@TODO image
707+
<p class="stretch"><img src="scipy-2019-files/spec-v2.png"></p>
663708

664709
====
665710

666-
## Integrations, applications and other implementations
711+
## Other Zarr implementations
667712

668-
* @@TODO dask, xarray, intake (e.g., Pangeo data catalog)
669-
* @@TODO z5 - C++ implementation
670-
* @@TODO Zarr.jl - native Julia implementation
671-
* @@TODO Scala implementation
672-
* @@TODO other implementations?
673-
* @@TODO Unidata working on implementation in NetCDF C library
674-
* @@TODO OME, microscopy
675-
* @@TODO single cell examples
676-
* @@TODO Met office use cases
713+
* z5 - C++ implementation using xtensor
714+
* Zarr.jl - native Julia implementation
715+
* @@TODO - Scala implementation
716+
* WIP: Zarr support in NetCDF C library
717+
718+
@@TODO links
677719

678720
====
679721

680-
## Future
722+
## Integrations and applications
681723

682-
* Zarr/N5
683-
* v3 protocol spec
724+
===
684725

685-
Community!
726+
### Xarray, Intake, Pangeo
727+
728+
@@TODO
729+
730+
===
731+
732+
### "High momentum" weather data
733+
734+
@@TODO met office work
735+
736+
===
737+
738+
### Open microscopy (OME)
739+
740+
@@TODO
741+
742+
===
743+
744+
### Single cell biology
745+
746+
@@TODO
747+
748+
====
749+
750+
## Future
751+
752+
* Zarr/N5 convergence.
753+
* Zarr protocol spec v3.
754+
* Community!
686755

687756
====
688757

689758
## Acknowledgments
690759

691-
@@TODO
760+
* Thanks to the Zarr core development team.
761+
762+
* Thanks to everyone who has contributed code or raised or commented
763+
on an issue or PR.
764+
765+
* Thanks to UK MRC and Wellcome Trust for supporting @alimanfoo.
766+
767+
* Zarr is a community-maintained open source project - please think of
768+
it as yours!

0 commit comments

Comments
 (0)