Skip to content

Commit bb37eb3

Browse files
committed
WIP: DOC: Improved Python interface docs
1 parent b7f5975 commit bb37eb3

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ A lean and kind
2929
3030
quick_start.md
3131
installation.md
32-
array_api.md
32+
python.md
3333
cli.md
3434
itk.md
3535
methods.md

docs/itk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Bidirectional type conversion that preserves spatial metadata is available with
88
Once represented as an `NgffImage`, a multiscale representation can be generated
99
with `to_multiscales`. And an OME-Zarr can be generated from the multiscales
1010
with `to_ngff_zarr`. For more information, see the
11-
[Python Array API documentation](./array_api.md).
11+
[Python interface documentation](./python.md).
1212

1313
## ITK Python
1414

docs/array_api.md renamed to docs/python.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
# 🐍 Python Array API
1+
# 🐍 Python Interface
22

3-
NGFF-Zarr supports conversion of any NumPy array-like object that follows the
4-
[Python Array API Standard](https://data-apis.org/array-api/latest/) into
5-
OME-Zarr. This includes such objects an NumPy `ndarray`'s, Dask Arrays, PyTorch
6-
Tensors, CuPy arrays, Zarr array, etc.
3+
NGFF-Zarr is a Python library that provides a simple, natural interface for
4+
working with OME-Zarr data structures, creating chunked, multiscale OME-Zarr
5+
image pyramids, and reading and writing OME-Zarr multiscale image files.
6+
7+
NGFF-Zarr's interface, which reflects the OME-Zarr data model, is built on
8+
Python's built-in [dataclasses] and [Dask arrays]. It is designed to be simple,
9+
flexible, and easy to use.
710

811
## Array to NGFF Image
912

10-
Convert the array to an `NgffImage`, which is a standard
11-
[Python dataclass](https://docs.python.org/3/library/dataclasses.html) that
12-
represents an OME-Zarr image for a single scale.
13+
NGFF-Zarr supports conversion of any NumPy array-like object that follows the
14+
[Python Array API Standard] into the OME-Zarr data model. This includes such
15+
objects an NumPy `ndarray`'s, Dask Arrays, PyTorch Tensors, CuPy arrays, Zarr
16+
array, etc.
17+
18+
Convert the array to an {NgffImage}`ngff_zarr.ngff_image.NgffImage`, which is a
19+
standard Python [dataclass] that represents an OME-Zarr image for a single
20+
scale.
1321

1422
When creating the image from the array, you can specify
1523

@@ -165,3 +173,8 @@ Any other
165173
also be used.
166174

167175
The multiscales will be computed and written out-of-core, limiting memory usage.
176+
177+
[dataclass]: https://docs.python.org/3/library/dataclasses.html
178+
[dataclasses]: https://docs.python.org/3/library/dataclasses.html
179+
[Dask arrays]: https://docs.dask.org/en/stable/array.html
180+
[Python Array API Standard]: https://data-apis.org/array-api/latest/

0 commit comments

Comments
 (0)