mirror of
https://github.com/p2p-ld/numpydantic.git
synced 2025-01-10 05:54:26 +00:00
lint
This commit is contained in:
parent
b436d8d592
commit
02855852b7
1 changed files with 9 additions and 7 deletions
|
@ -170,19 +170,21 @@ class ZarrInterface(Interface):
|
||||||
) -> list | ZarrJsonDict:
|
) -> list | ZarrJsonDict:
|
||||||
"""
|
"""
|
||||||
Dump a Zarr Array to JSON
|
Dump a Zarr Array to JSON
|
||||||
|
|
||||||
If ``info.round_trip == False``, dump the array as a list of lists.
|
If ``info.round_trip == False``, dump the array as a list of lists.
|
||||||
This may be a memory-intensive operation.
|
This may be a memory-intensive operation.
|
||||||
|
|
||||||
Otherwise, dump the metadata for an array from :meth:`zarr.core.Array.info_items`
|
Otherwise, dump the metadata for an array from
|
||||||
|
:meth:`zarr.core.Array.info_items`
|
||||||
plus the :meth:`zarr.core.Array.hexdigest` as a :class:`.ZarrJsonDict`
|
plus the :meth:`zarr.core.Array.hexdigest` as a :class:`.ZarrJsonDict`
|
||||||
|
|
||||||
If either the ``zarr_dump_array`` value in the context dictionary is ``True``
|
If either the ``zarr_dump_array`` value in the context dictionary is ``True``
|
||||||
or the zarr array is an in-memory array, dump the array as well
|
or the zarr array is an in-memory array, dump the array as well
|
||||||
(since without a persistent array it would be impossible to roundtrip and
|
(since without a persistent array it would be impossible to roundtrip and
|
||||||
dumping to JSON would be meaningless)
|
dumping to JSON would be meaningless)
|
||||||
|
|
||||||
Passing ``'zarr_dump_array': True`` to the serialization ``context`` looks like this::
|
Passing ``'zarr_dump_array': True`` to the serialization ``context``
|
||||||
|
looks like this::
|
||||||
|
|
||||||
model.model_dump_json(context={'zarr_dump_array': True})
|
model.model_dump_json(context={'zarr_dump_array': True})
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue