From 503a2f81fa90a37428dad0f8c3ecd6e6872ef270 Mon Sep 17 00:00:00 2001 From: zoj613 Date: Sun, 18 Aug 2024 15:35:13 +0000 Subject: [PATCH] deploy: ce298c2ffecbc0060877a4d74bd74d160b3b34de --- index.html | 2 + zarr-lwt/Zarr_lwt/Deferred/Infix/index.html | 2 + zarr-lwt/Zarr_lwt/Deferred/index.html | 2 + .../FilesystemStore/Deferred/Infix/index.html | 2 + .../FilesystemStore/Deferred/index.html | 2 + .../Storage/FilesystemStore/index.html | 38 ++++++++++++ .../MemoryStore/Deferred/Infix/index.html | 2 + .../Storage/MemoryStore/Deferred/index.html | 2 + .../Zarr_lwt/Storage/MemoryStore/index.html | 38 ++++++++++++ zarr-lwt/Zarr_lwt/Storage/index.html | 2 + zarr-lwt/Zarr_lwt/index.html | 2 + zarr-lwt/index.html | 2 + zarr-sync/Zarr_sync/Deferred/Infix/index.html | 2 + zarr-sync/Zarr_sync/Deferred/index.html | 2 + .../FilesystemStore/Deferred/Infix/index.html | 2 + .../FilesystemStore/Deferred/index.html | 2 + .../Storage/FilesystemStore/index.html | 38 ++++++++++++ .../MemoryStore/Deferred/Infix/index.html | 2 + .../Storage/MemoryStore/Deferred/index.html | 2 + .../Zarr_sync/Storage/MemoryStore/index.html | 38 ++++++++++++ zarr-sync/Zarr_sync/Storage/index.html | 2 + zarr-sync/Zarr_sync/index.html | 2 + zarr-sync/index.html | 2 + zarr/Zarr/ArrayMetadata/index.html | 11 ---- zarr/Zarr/Codecs/Chain/index.html | 26 +------- .../argument-1-Io/Deferred/Infix/index.html | 2 + .../Make/argument-1-Io/Deferred/index.html | 2 + .../Zarr/Codecs/Make/argument-1-Io/index.html | 14 +++++ zarr/Zarr/Codecs/Make/index.html | 15 +++++ zarr/Zarr/Codecs/index.html | 4 +- zarr/Zarr/GroupMetadata/index.html | 2 - zarr/Zarr/Indexing/index.html | 2 - .../Make/argument-1-Deferred/Infix/index.html | 2 + .../Make/argument-1-Deferred/index.html | 2 + zarr/Zarr/Memory/Make/index.html | 17 ++++++ zarr/Zarr/Memory/StrMap/index.html | 6 ++ zarr/Zarr/Memory/index.html | 2 + zarr/Zarr/Metadata/ArrayMetadata/index.html | 11 ++++ zarr/Zarr/Metadata/FillValue/index.html | 2 + zarr/Zarr/Metadata/GroupMetadata/index.html | 2 + zarr/Zarr/Metadata/index.html | 2 + zarr/Zarr/Node/ArrayNode/index.html | 2 +- zarr/Zarr/Node/GroupNode/index.html | 2 +- zarr/Zarr/Node/index.html | 2 +- zarr/Zarr/Storage/FilesystemStore/index.html | 48 --------------- .../Storage/Make/Deferred/Infix/index.html | 2 + zarr/Zarr/Storage/Make/Deferred/index.html | 2 + .../argument-1-Io/Deferred/Infix/index.html | 2 + .../Make/argument-1-Io/Deferred/index.html | 2 + .../Storage/Make/argument-1-Io/index.html | 14 +++++ .../Zarr/Storage/Make/argument-1-M/index.html | 11 ---- zarr/Zarr/Storage/Make/index.html | 30 ++++------ zarr/Zarr/Storage/MemoryStore/index.html | 42 ------------- zarr/Zarr/Storage/index.html | 4 +- .../module-type-MAKER/argument-1-M/index.html | 11 ---- .../Zarr/Storage/module-type-MAKER/index.html | 42 ------------- zarr/Zarr/Storage/module-type-S/index.html | 42 ------------- .../Deferred/Infix/index.html | 2 + .../module-type-STORE/Deferred/index.html | 2 + .../Zarr/Storage/module-type-STORE/index.html | 43 ++++++++++--- zarr/Zarr/Types/index.html | 2 + .../module-type-Deferred/Infix/index.html | 2 + .../Types/module-type-Deferred/index.html | 2 + .../module-type-IO/Deferred/Infix/index.html | 2 + .../Types/module-type-IO/Deferred/index.html | 2 + zarr/Zarr/Types/module-type-IO/index.html | 7 +++ zarr/Zarr/Util/ArrayMap/index.html | 6 ++ zarr/Zarr/Util/ExtPoint/index.html | 2 + zarr/Zarr/Util/Indexing/index.html | 2 + zarr/Zarr/Util/Result_syntax/index.html | 5 ++ zarr/Zarr/Util/index.html | 2 + zarr/Zarr/index.html | 60 ++++++------------- 72 files changed, 405 insertions(+), 308 deletions(-) create mode 100644 zarr-lwt/Zarr_lwt/Deferred/Infix/index.html create mode 100644 zarr-lwt/Zarr_lwt/Deferred/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/Infix/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/FilesystemStore/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/Infix/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/MemoryStore/index.html create mode 100644 zarr-lwt/Zarr_lwt/Storage/index.html create mode 100644 zarr-lwt/Zarr_lwt/index.html create mode 100644 zarr-lwt/index.html create mode 100644 zarr-sync/Zarr_sync/Deferred/Infix/index.html create mode 100644 zarr-sync/Zarr_sync/Deferred/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/Infix/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/FilesystemStore/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/Infix/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/MemoryStore/index.html create mode 100644 zarr-sync/Zarr_sync/Storage/index.html create mode 100644 zarr-sync/Zarr_sync/index.html create mode 100644 zarr-sync/index.html delete mode 100644 zarr/Zarr/ArrayMetadata/index.html create mode 100644 zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/Infix/index.html create mode 100644 zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/index.html create mode 100644 zarr/Zarr/Codecs/Make/argument-1-Io/index.html create mode 100644 zarr/Zarr/Codecs/Make/index.html delete mode 100644 zarr/Zarr/GroupMetadata/index.html delete mode 100644 zarr/Zarr/Indexing/index.html create mode 100644 zarr/Zarr/Memory/Make/argument-1-Deferred/Infix/index.html create mode 100644 zarr/Zarr/Memory/Make/argument-1-Deferred/index.html create mode 100644 zarr/Zarr/Memory/Make/index.html create mode 100644 zarr/Zarr/Memory/StrMap/index.html create mode 100644 zarr/Zarr/Memory/index.html create mode 100644 zarr/Zarr/Metadata/ArrayMetadata/index.html create mode 100644 zarr/Zarr/Metadata/FillValue/index.html create mode 100644 zarr/Zarr/Metadata/GroupMetadata/index.html create mode 100644 zarr/Zarr/Metadata/index.html delete mode 100644 zarr/Zarr/Storage/FilesystemStore/index.html create mode 100644 zarr/Zarr/Storage/Make/Deferred/Infix/index.html create mode 100644 zarr/Zarr/Storage/Make/Deferred/index.html create mode 100644 zarr/Zarr/Storage/Make/argument-1-Io/Deferred/Infix/index.html create mode 100644 zarr/Zarr/Storage/Make/argument-1-Io/Deferred/index.html create mode 100644 zarr/Zarr/Storage/Make/argument-1-Io/index.html delete mode 100644 zarr/Zarr/Storage/Make/argument-1-M/index.html delete mode 100644 zarr/Zarr/Storage/MemoryStore/index.html delete mode 100644 zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html delete mode 100644 zarr/Zarr/Storage/module-type-MAKER/index.html delete mode 100644 zarr/Zarr/Storage/module-type-S/index.html create mode 100644 zarr/Zarr/Storage/module-type-STORE/Deferred/Infix/index.html create mode 100644 zarr/Zarr/Storage/module-type-STORE/Deferred/index.html create mode 100644 zarr/Zarr/Types/index.html create mode 100644 zarr/Zarr/Types/module-type-Deferred/Infix/index.html create mode 100644 zarr/Zarr/Types/module-type-Deferred/index.html create mode 100644 zarr/Zarr/Types/module-type-IO/Deferred/Infix/index.html create mode 100644 zarr/Zarr/Types/module-type-IO/Deferred/index.html create mode 100644 zarr/Zarr/Types/module-type-IO/index.html create mode 100644 zarr/Zarr/Util/ArrayMap/index.html create mode 100644 zarr/Zarr/Util/ExtPoint/index.html create mode 100644 zarr/Zarr/Util/Indexing/index.html create mode 100644 zarr/Zarr/Util/Result_syntax/index.html create mode 100644 zarr/Zarr/Util/index.html diff --git a/index.html b/index.html index c510bc95..4d2298d6 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,8 @@

OCaml package documentation

  1. zarr 0.1.0
  2. +
  3. zarr-lwt 0.1.0
  4. +
  5. zarr-sync 0.1.0
diff --git a/zarr-lwt/Zarr_lwt/Deferred/Infix/index.html b/zarr-lwt/Zarr_lwt/Deferred/Infix/index.html new file mode 100644 index 00000000..3a4d9137 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-lwt.Zarr_lwt.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-lwt/Zarr_lwt/Deferred/index.html b/zarr-lwt/Zarr_lwt/Deferred/index.html new file mode 100644 index 00000000..18a7faf1 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-lwt.Zarr_lwt.Deferred)

Module Zarr_lwt.Deferred

include Zarr.Types.Deferred with type 'a t = 'a Lwt.t
type 'a t = 'a Lwt.t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/Infix/index.html b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/Infix/index.html new file mode 100644 index 00000000..7d2cf4b9 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-lwt.Zarr_lwt.Storage.FilesystemStore.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/index.html b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/index.html new file mode 100644 index 00000000..7d987ee6 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-lwt.Zarr_lwt.Storage.FilesystemStore.Deferred)

Module FilesystemStore.Deferred

type 'a t = 'a Lwt.t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/index.html b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/index.html new file mode 100644 index 00000000..e08ce342 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/FilesystemStore/index.html @@ -0,0 +1,38 @@ + +FilesystemStore (zarr-lwt.Zarr_lwt.Storage.FilesystemStore)

Module Storage.FilesystemStore

A local filesystem storage backend for a Zarr V3 hierarchy.

include Zarr.Storage.STORE with type 'a Deferred.t = 'a Lwt.t
module Deferred : Zarr.Types.Deferred with type 'a t = 'a Lwt.t
type t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> + t -> + Zarr.Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Zarr.Codecs.codec_chain -> + shape:int array -> + chunks:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + Zarr.Node.ArrayNode.t -> + t -> + unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : + t -> + Zarr.Node.GroupNode.t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Zarr.Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Zarr.Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Zarr.Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Zarr.Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b) Stdlib.Bigarray.kind -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Zarr.Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
val create : ?perm:Unix.file_perm -> string -> t

create ~perm dir returns a new filesystem store.

  • raises Failure

    if dir is a directory that already exists.

val open_store : ?perm:Unix.file_perm -> string -> t

open_store ~perm dir returns an existing filesystem Zarr store.

  • raises Failure

    if dir is not a Zarr store path.

diff --git a/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/Infix/index.html b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/Infix/index.html new file mode 100644 index 00000000..24436620 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-lwt.Zarr_lwt.Storage.MemoryStore.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/index.html b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/index.html new file mode 100644 index 00000000..de4760d6 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-lwt.Zarr_lwt.Storage.MemoryStore.Deferred)

Module MemoryStore.Deferred

type 'a t = 'a Lwt.t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-lwt/Zarr_lwt/Storage/MemoryStore/index.html b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/index.html new file mode 100644 index 00000000..9c8df24e --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/MemoryStore/index.html @@ -0,0 +1,38 @@ + +MemoryStore (zarr-lwt.Zarr_lwt.Storage.MemoryStore)

Module Storage.MemoryStore

An in-memory storage backend for Zarr V3 hierarchy.

include Zarr.Storage.STORE with type 'a Deferred.t = 'a Lwt.t
module Deferred : Zarr.Types.Deferred with type 'a t = 'a Lwt.t
type t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> + t -> + Zarr.Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Zarr.Codecs.codec_chain -> + shape:int array -> + chunks:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + Zarr.Node.ArrayNode.t -> + t -> + unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : + t -> + Zarr.Node.GroupNode.t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Zarr.Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Zarr.Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Zarr.Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Zarr.Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b) Stdlib.Bigarray.kind -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Zarr.Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
val create : unit -> t

create () returns a new In-memory Zarr store type.

diff --git a/zarr-lwt/Zarr_lwt/Storage/index.html b/zarr-lwt/Zarr_lwt/Storage/index.html new file mode 100644 index 00000000..01094278 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/Storage/index.html @@ -0,0 +1,2 @@ + +Storage (zarr-lwt.Zarr_lwt.Storage)

Module Zarr_lwt.Storage

module MemoryStore : sig ... end

An in-memory storage backend for Zarr V3 hierarchy.

module FilesystemStore : sig ... end

A local filesystem storage backend for a Zarr V3 hierarchy.

diff --git a/zarr-lwt/Zarr_lwt/index.html b/zarr-lwt/Zarr_lwt/index.html new file mode 100644 index 00000000..fac21681 --- /dev/null +++ b/zarr-lwt/Zarr_lwt/index.html @@ -0,0 +1,2 @@ + +Zarr_lwt (zarr-lwt.Zarr_lwt)

Module Zarr_lwt

module Deferred : sig ... end
module Storage : sig ... end
diff --git a/zarr-lwt/index.html b/zarr-lwt/index.html new file mode 100644 index 00000000..2888761e --- /dev/null +++ b/zarr-lwt/index.html @@ -0,0 +1,2 @@ + +index (zarr-lwt.index)

zarr-lwt index

Library zarr-lwt

The entry point of this library is the module: Zarr_lwt.

diff --git a/zarr-sync/Zarr_sync/Deferred/Infix/index.html b/zarr-sync/Zarr_sync/Deferred/Infix/index.html new file mode 100644 index 00000000..0b9c8014 --- /dev/null +++ b/zarr-sync/Zarr_sync/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-sync.Zarr_sync.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-sync/Zarr_sync/Deferred/index.html b/zarr-sync/Zarr_sync/Deferred/index.html new file mode 100644 index 00000000..65e57ebb --- /dev/null +++ b/zarr-sync/Zarr_sync/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-sync.Zarr_sync.Deferred)

Module Zarr_sync.Deferred

include Zarr.Types.Deferred with type 'a t = 'a
type 'a t = 'a
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/Infix/index.html b/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/Infix/index.html new file mode 100644 index 00000000..8fda5cfc --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-sync.Zarr_sync.Storage.FilesystemStore.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/index.html b/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/index.html new file mode 100644 index 00000000..514b68f7 --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/FilesystemStore/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-sync.Zarr_sync.Storage.FilesystemStore.Deferred)

Module FilesystemStore.Deferred

type 'a t = 'a
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-sync/Zarr_sync/Storage/FilesystemStore/index.html b/zarr-sync/Zarr_sync/Storage/FilesystemStore/index.html new file mode 100644 index 00000000..8f48eb1b --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/FilesystemStore/index.html @@ -0,0 +1,38 @@ + +FilesystemStore (zarr-sync.Zarr_sync.Storage.FilesystemStore)

Module Storage.FilesystemStore

A local filesystem storage backend for a Zarr V3 hierarchy.

include Zarr.Storage.STORE with type 'a Deferred.t = 'a
module Deferred : Zarr.Types.Deferred with type 'a t = 'a
type t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> + t -> + Zarr.Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Zarr.Codecs.codec_chain -> + shape:int array -> + chunks:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + Zarr.Node.ArrayNode.t -> + t -> + unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : + t -> + Zarr.Node.GroupNode.t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Zarr.Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Zarr.Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Zarr.Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Zarr.Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b) Stdlib.Bigarray.kind -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Zarr.Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
val create : ?perm:Unix.file_perm -> string -> t

create ~perm dir returns a new filesystem store.

  • raises Failure

    if dir is a directory that already exists.

val open_store : ?perm:Unix.file_perm -> string -> t

open_store ~perm dir returns an existing filesystem Zarr store.

  • raises Failure

    if dir is not a Zarr store path.

diff --git a/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/Infix/index.html b/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/Infix/index.html new file mode 100644 index 00000000..339c64c3 --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr-sync.Zarr_sync.Storage.MemoryStore.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/index.html b/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/index.html new file mode 100644 index 00000000..312c3e7e --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/MemoryStore/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr-sync.Zarr_sync.Storage.MemoryStore.Deferred)

Module MemoryStore.Deferred

type 'a t = 'a
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr-sync/Zarr_sync/Storage/MemoryStore/index.html b/zarr-sync/Zarr_sync/Storage/MemoryStore/index.html new file mode 100644 index 00000000..23dcb67c --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/MemoryStore/index.html @@ -0,0 +1,38 @@ + +MemoryStore (zarr-sync.Zarr_sync.Storage.MemoryStore)

Module Storage.MemoryStore

An in-memory storage backend for Zarr V3 hierarchy.

include Zarr.Storage.STORE with type 'a Deferred.t = 'a
module Deferred : Zarr.Types.Deferred with type 'a t = 'a
type t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> + t -> + Zarr.Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Zarr.Codecs.codec_chain -> + shape:int array -> + chunks:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + Zarr.Node.ArrayNode.t -> + t -> + unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : + t -> + Zarr.Node.GroupNode.t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Zarr.Node.ArrayNode.t list * Zarr.Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Zarr.Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Zarr.Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Zarr.Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Zarr.Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : + t -> + Zarr.Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b) Stdlib.Bigarray.kind -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Zarr.Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
val create : unit -> t

create () returns a new In-memory Zarr store type.

diff --git a/zarr-sync/Zarr_sync/Storage/index.html b/zarr-sync/Zarr_sync/Storage/index.html new file mode 100644 index 00000000..122c6da0 --- /dev/null +++ b/zarr-sync/Zarr_sync/Storage/index.html @@ -0,0 +1,2 @@ + +Storage (zarr-sync.Zarr_sync.Storage)

Module Zarr_sync.Storage

module MemoryStore : sig ... end

An in-memory storage backend for Zarr V3 hierarchy.

module FilesystemStore : sig ... end

A local filesystem storage backend for a Zarr V3 hierarchy.

diff --git a/zarr-sync/Zarr_sync/index.html b/zarr-sync/Zarr_sync/index.html new file mode 100644 index 00000000..f0e031ff --- /dev/null +++ b/zarr-sync/Zarr_sync/index.html @@ -0,0 +1,2 @@ + +Zarr_sync (zarr-sync.Zarr_sync)

Module Zarr_sync

module Deferred : sig ... end
module Storage : sig ... end
diff --git a/zarr-sync/index.html b/zarr-sync/index.html new file mode 100644 index 00000000..6471e7f6 --- /dev/null +++ b/zarr-sync/index.html @@ -0,0 +1,2 @@ + +index (zarr-sync.index)

zarr-sync index

Library zarr-sync

The entry point of this library is the module: Zarr_sync.

diff --git a/zarr/Zarr/ArrayMetadata/index.html b/zarr/Zarr/ArrayMetadata/index.html deleted file mode 100644 index 548cc693..00000000 --- a/zarr/Zarr/ArrayMetadata/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -ArrayMetadata (zarr.Zarr.ArrayMetadata)

Module Zarr.ArrayMetadata

A module which contains functionality to work with a parsed JSON Zarr array metadata document.

type t

A type representing a parsed array metadata document.

val create : - ?sep:[< `Dot | `Slash Slash ] -> - ?dimension_names:string option list -> - ?attributes:Yojson.Safe.t -> - codecs:Codecs.Chain.t -> - shape:int array -> - ('a, 'b) Stdlib.Bigarray.kind -> - 'a -> - int array -> - (t, [> Zarr__.Metadata.error ]) Stdlib.result

create ~codecs ~shape kind fv cshp Creates a new array metadata document with codec chain codecs, shape shape, fill value fv, data type kind and chunk shape cshp. This operation returns an error if chunk shape is invalid.

val encode : t -> string

encode t returns a byte string representing a JSON Zarr array metadata.

val decode : string -> (t, [> `Store_read of string ]) Stdlib.result

decode s decodes a bytes string s into a ArrayMetadata.t type, and returns an error if the decoding process fails.

val shape : t -> int array

shape t returns the shape of the zarr array represented by metadata type t.

val chunk_shape : t -> int array

chunk_shape t returns the shape a chunk in this zarr array.

val is_valid_kind : t -> ('a, 'b) Stdlib.Bigarray.kind -> bool

is_valid_kind t kind checks if kind is a valid Bigarray kind that matches the data type of the zarr array represented by this metadata type.

val fillvalue_of_kind : t -> ('a, 'b) Stdlib.Bigarray.kind -> 'a

fillvalue_of_kind t kind returns the fill value of uninitialized chunks in this zarr array given kind. Raises Failure if the kind is not compatible with this array's fill value.

val attributes : t -> Yojson.Safe.t

attributes t Returns a Yojson type containing user attributes assigned to the zarr array represented by t.

val dimension_names : t -> string option list

dimension_name t returns a list of dimension names. If none are defined then an empty list is returned.

val codecs : t -> Codecs.Chain.t

codecs t Returns a type representing the chain of codecs applied when decoding/encoding a Zarr array chunk.

val index_coord_pair : t -> int array -> int array * int array

index_coord_pair t coord maps a coordinate of this Zarr array to a pair of chunk index and coordinate within that chunk.

val chunk_indices : t -> int array -> int array list

chunk_indices t shp returns a list of all chunk indices that would be contained in a zarr array of shape shp given the regular grid defined in array metadata t.

val chunk_key : t -> int array -> string

chunk_key t idx returns a key encoding of a the chunk index idx.

val update_attributes : t -> Yojson.Safe.t -> t

update_attributes t json returns a new metadata type with an updated attribute field containing contents in json

val update_shape : t -> int array -> t

update_shape t new_shp returns a new metadata type containing shape new_shp.

val (=) : t -> t -> bool

a = b returns true if a b are equal array metadata documents and false otherwise.

diff --git a/zarr/Zarr/Codecs/Chain/index.html b/zarr/Zarr/Codecs/Chain/index.html index 4279f08f..cb921a1b 100644 --- a/zarr/Zarr/Codecs/Chain/index.html +++ b/zarr/Zarr/Codecs/Chain/index.html @@ -1,29 +1,9 @@ -Chain (zarr.Zarr.Codecs.Chain)

Module Codecs.Chain

A module containing functions to encode/decode an array chunk using a predefined set of codecs.

type t

A type representing a valid chain of codecs for decoding/encoding a Zarr array chunk.

val create : - ('a, 'b) array_repr -> - codec_chain -> - (t, [> error ]) Stdlib.result

create r c returns a type representing a chain of codecs defined by chain c and decoded array representation type r.

val is_just_sharding : t -> bool

is_just_sharding t is true if the codec chain t contains only the sharding_indexed codec.

val encode : +Chain (zarr.Zarr.Codecs.Chain)

Module Codecs.Chain

A module containing functions to encode/decode an array chunk using a predefined set of codecs.

type t

A type representing a valid chain of codecs for decoding/encoding a Zarr array chunk.

val create : int array -> codec_chain -> t

create s c returns a type representing a chain of codecs defined by chain c and chunk shape s.

  • raises Failure

    if c is invalid.

val encode : t -> ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (string, [> error ]) Stdlib.result

encode t x computes the encoded byte string representation of array chunk x. Returns an error upon failure.

val decode : + string

encode t x computes the encoded byte string representation of array chunk x.

val decode : t -> ('a, 'b) array_repr -> string -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> `Store_read of string | error ]) - Stdlib.result

decode t repr x decodes the byte string x using codec chain t and decoded representation type repr. Returns an error upon failure.

val partial_encode : - t -> - ((int * int option) list -> - (string list, [> `Store_read of string | error ] as 'c) Stdlib.result) -> - partial_setter -> - int -> - ('a, 'b) array_repr -> - (int array * 'a) list -> - (unit, 'c) Stdlib.result
val partial_decode : - t -> - ((int * int option) list -> - (string list, [> `Store_read of string | error ] as 'c) Stdlib.result) -> - int -> - ('a, 'b) array_repr -> - (int * int array) list -> - ((int * 'a) list, 'c) Stdlib.result
val (=) : t -> t -> bool

x = y returns true if chain x is equal to chain y, and false otherwise.

val of_yojson : Yojson.Safe.t -> (t, string) Stdlib.result

of_yojson x returns a code chain of type t from its json object representation.

val to_yojson : t -> Yojson.Safe.t

to_yojson x returns a json object representation of codec chain x.

+ ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t

decode t repr x decodes the byte string x using codec chain t and decoded representation type repr.

val (=) : t -> t -> bool

x = y returns true if chain x is equal to chain y, and false otherwise.

val of_yojson : int array -> Yojson.Safe.t -> (t, string) Stdlib.result

of_yojson x returns a code chain of type t from its json object representation.

val to_yojson : t -> Yojson.Safe.t

to_yojson x returns a json object representation of codec chain x.

diff --git a/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/Infix/index.html b/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/Infix/index.html new file mode 100644 index 00000000..2fe2b01d --- /dev/null +++ b/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Codecs.Make.Io.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/index.html b/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/index.html new file mode 100644 index 00000000..f8b3a993 --- /dev/null +++ b/zarr/Zarr/Codecs/Make/argument-1-Io/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Codecs.Make.Io.Deferred)

Module Io.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Codecs/Make/argument-1-Io/index.html b/zarr/Zarr/Codecs/Make/argument-1-Io/index.html new file mode 100644 index 00000000..261d84b2 --- /dev/null +++ b/zarr/Zarr/Codecs/Make/argument-1-Io/index.html @@ -0,0 +1,14 @@ + +Io (zarr.Zarr.Codecs.Make.Io)

Parameter Make.Io

The abstract store interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a "/". In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. (i.e. a store is a mapping from keys to values). It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> Types.key -> int Deferred.t
val get_partial_values : + t -> + string -> + Types.range list -> + Types.value list Deferred.t
val set : t -> Types.key -> Types.value -> unit Deferred.t
val set_partial_values : + t -> + Types.key -> + ?append:bool -> + (Types.range_start * Types.value) list -> + unit Deferred.t
val erase : t -> Types.key -> unit Deferred.t
val erase_prefix : t -> Types.key -> unit Deferred.t
val list : t -> Types.key list Deferred.t
val list_prefix : t -> Types.key -> Types.key list Deferred.t
val list_dir : + t -> + Types.key -> + (Types.key list * Types.prefix list) Deferred.t
val is_member : t -> Types.key -> bool Deferred.t
diff --git a/zarr/Zarr/Codecs/Make/index.html b/zarr/Zarr/Codecs/Make/index.html new file mode 100644 index 00000000..44985e9f --- /dev/null +++ b/zarr/Zarr/Codecs/Make/index.html @@ -0,0 +1,15 @@ + +Make (zarr.Zarr.Codecs.Make)

Module Codecs.Make

Parameters

module Io : Types.IO

Signature

val is_just_sharding : Chain.t -> bool

is_just_sharding t is true if the codec chain t contains only the sharding_indexed codec.

val partial_encode : + Chain.t -> + ((int * int option) list -> string list Io.Deferred.t) -> + (?append:bool -> (int * string) list -> unit Io.Deferred.t) -> + int -> + ('a, 'b) array_repr -> + (int array * 'a) list -> + unit Io.Deferred.t
val partial_decode : + Chain.t -> + ((int * int option) list -> string list Io.Deferred.t) -> + int -> + ('a, 'b) array_repr -> + (int * int array) list -> + (int * 'a) list Io.Deferred.t
diff --git a/zarr/Zarr/Codecs/index.html b/zarr/Zarr/Codecs/index.html index 5b5a3b00..163c452c 100644 --- a/zarr/Zarr/Codecs/index.html +++ b/zarr/Zarr/Codecs/index.html @@ -1,6 +1,6 @@ -Codecs (zarr.Zarr.Codecs)

Module Zarr.Codecs

An array has an associated list of codecs. Each codec specifies a bidirectional transform (an encode transform and a decode transform). This module contains building blocks for creating and working with a chain of codecs.

type arraytoarray = [
  1. | `Transpose of int array
]

The type of array -> array codecs.

type compression_level =
  1. | L0
  2. | L1
  3. | L2
  4. | L3
  5. | L4
  6. | L5
  7. | L6
  8. | L7
  9. | L8
  10. | L9

A type representing valid Gzip codec compression levels.

type fixed_bytestobytes = [
  1. | `Crc32c
]

A type representing bytes -> bytes codecs that produce fixed sized encoded strings.

type variable_bytestobytes = [
  1. | `Gzip of compression_level
]

A type representing bytes -> bytes codecs that produce variable sized encoded strings.

type bytestobytes = [
  1. | fixed_bytestobytes
  2. | variable_bytestobytes
]

The type of bytes -> bytes codecs.

type endianness =
  1. | LE
  2. | BE

A type representing the configured endianness of an array.

type loc =
  1. | Start
  2. | End

A type representing the location of a shard's index array in an encoded byte string.

type fixed_arraytobytes = [
  1. | `Bytes of endianness
]

The type of array -> bytes codecs.

type variable_array_tobytes = [
  1. | `ShardingIndexed of shard_config
]
and shard_config = {
  1. chunk_shape : int array;
  2. codecs : [ arraytoarray +Codecs (zarr.Zarr.Codecs)

    Module Zarr.Codecs

    An array has an associated list of codecs. Each codec specifies a bidirectional transform (an encode transform and a decode transform). This module contains building blocks for creating and working with a chain of codecs.

    type arraytoarray = [
    1. | `Transpose of int array
    ]

    The type of array -> array codecs.

    type compression_level =
    1. | L0
    2. | L1
    3. | L2
    4. | L3
    5. | L4
    6. | L5
    7. | L6
    8. | L7
    9. | L8
    10. | L9

    A type representing valid Gzip codec compression levels.

    type fixed_bytestobytes = [
    1. | `Crc32c
    ]

    A type representing bytes -> bytes codecs that produce fixed sized encoded strings.

    type variable_bytestobytes = [
    1. | `Gzip of compression_level
    ]

    A type representing bytes -> bytes codecs that produce variable sized encoded strings.

    type bytestobytes = [
    1. | fixed_bytestobytes
    2. | variable_bytestobytes
    ]

    The type of bytes -> bytes codecs.

    type endianness =
    1. | LE
    2. | BE

    A type representing the configured endianness of an array.

    type loc =
    1. | Start
    2. | End

    A type representing the location of a shard's index array in an encoded byte string.

    type fixed_arraytobytes = [
    1. | `Bytes of endianness
    ]

    The type of array -> bytes codecs that produce fixed sized encoded string.

    type variable_array_tobytes = [
    1. | `ShardingIndexed of shard_config
    ]

    The type of array -> bytes codecs that produce variable sized encoded string.

    and shard_config = {
    1. chunk_shape : int array;
    2. codecs : [ arraytoarray | fixed_arraytobytes | `ShardingIndexed of shard_config | bytestobytes ] - list;
    3. index_codecs : [ arraytoarray | fixed_arraytobytes | fixed_bytestobytes ] list;
    4. index_location : loc;
    }

    A type representing the Sharding indexed codec's configuration parameters.

    type array_tobytes = [
    1. | fixed_arraytobytes
    2. | variable_array_tobytes
    ]

    The type of array -> bytes codecs.

    type codec_chain = [ arraytoarray | array_tobytes | bytestobytes ] list

    A type used to build a user-defined chain of codecs when creating a Zarr array.

    type error = [
    1. | `Extension of string
    2. | `Gzip of Ezgzip.error
    3. | `Transpose_order of int array * string
    4. | `CodecChain of string
    5. | `Sharding of int array * int array * string
    ]

    The type of errors returned upon failure when an calling a function on a Chain type.

    type partial_setter = ?append:bool -> (int * string) list -> unit
    type ('a, 'b) array_repr = {
    1. kind : ('a, 'b) Stdlib.Bigarray.kind;
    2. shape : int array;
    3. fill_value : 'a;
    }

    The type summarizing the decoded/encoded representation of a Zarr array or chunk.

    module Chain : sig ... end

    A module containing functions to encode/decode an array chunk using a predefined set of codecs.

    + list
    ;
  3. index_codecs : [ arraytoarray | fixed_arraytobytes | fixed_bytestobytes ] list;
  4. index_location : loc;
}

A type representing the Sharding indexed codec's configuration parameters.

type array_tobytes = [
  1. | fixed_arraytobytes
  2. | variable_array_tobytes
]

The type of array -> bytes codecs.

type codec_chain = [ arraytoarray | array_tobytes | bytestobytes ] list

A type used to build a user-defined chain of codecs when creating a Zarr array.

type ('a, 'b) array_repr = {
  1. kind : ('a, 'b) Stdlib.Bigarray.kind;
  2. shape : int array;
}

The type summarizing the decoded/encoded representation of a Zarr array or chunk.

module Chain : sig ... end

A module containing functions to encode/decode an array chunk using a predefined set of codecs.

module Make (Io : Types.IO) : sig ... end
diff --git a/zarr/Zarr/GroupMetadata/index.html b/zarr/Zarr/GroupMetadata/index.html deleted file mode 100644 index 85385e1f..00000000 --- a/zarr/Zarr/GroupMetadata/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -GroupMetadata (zarr.Zarr.GroupMetadata)

Module Zarr.GroupMetadata

A module which contains functionality to work with a parsed JSON Zarr group metadata document.

type t

A type representing a parsed group metadata document.

val default : t

Return a group metadata type with default values for all fields.

val encode : t -> string

encode t returns a byte string representing a JSON Zarr group metadata.

val decode : string -> (t, [> `Store_read of string ]) Stdlib.result

decode s decodes a bytes string s into a t type, and returns an error if the decoding process fails.

val update_attributes : t -> Yojson.Safe.t -> t

update_attributes t json returns a new metadata type with an updated attribute field containing contents in json.

val show : t -> string

show t pretty-prints the contents of the group metadata type t.

val attributes : t -> Yojson.Safe.t

attributes t Returns a Yojson type containing user attributes assigned to the zarr group represented by t.

diff --git a/zarr/Zarr/Indexing/index.html b/zarr/Zarr/Indexing/index.html deleted file mode 100644 index de46736e..00000000 --- a/zarr/Zarr/Indexing/index.html +++ /dev/null @@ -1,2 +0,0 @@ - -Indexing (zarr.Zarr.Indexing)

Module Zarr.Indexing

A module housing functions for creating and manipulating indices and slices for working with Zarr arrays.

val slice_of_coords : int array list -> Owl_types.index array

slice_of_coords c takes a list of array coordinates and returns a slice corresponding to the coordinates.

val coords_of_slice : Owl_types.index array -> int array -> int array array

coords_of_slice s shp returns an array of coordinates given a slice s and array shape shp.

val cartesian_prod : 'a list list -> 'a list list

cartesian_prod ll returns a cartesian product of the elements of list ll. It is mainly used to generate a C-order of chunk indices in a regular Zarr array grid.

val slice_shape : Owl_types.index array -> int array -> int array

slice_shape s shp returns the shape of slice s within an array of shape shp.

diff --git a/zarr/Zarr/Memory/Make/argument-1-Deferred/Infix/index.html b/zarr/Zarr/Memory/Make/argument-1-Deferred/Infix/index.html new file mode 100644 index 00000000..2503122e --- /dev/null +++ b/zarr/Zarr/Memory/Make/argument-1-Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Memory.Make.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Memory/Make/argument-1-Deferred/index.html b/zarr/Zarr/Memory/Make/argument-1-Deferred/index.html new file mode 100644 index 00000000..a38368d5 --- /dev/null +++ b/zarr/Zarr/Memory/Make/argument-1-Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Memory.Make.Deferred)

Parameter Make.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Memory/Make/index.html b/zarr/Zarr/Memory/Make/index.html new file mode 100644 index 00000000..1c09d6a0 --- /dev/null +++ b/zarr/Zarr/Memory/Make/index.html @@ -0,0 +1,17 @@ + +Make (zarr.Zarr.Memory.Make)

Module Memory.Make

Parameters

Signature

module Deferred = Deferred
type t = string StrMap.t Stdlib.Atomic.t
val get : 'a StrMap.t Stdlib.Atomic.t -> StrMap.key -> 'b Deferred.t
val set : 'a StrMap.t Stdlib.Atomic.t -> StrMap.key -> 'b -> unit Deferred.t
val list : 'a StrMap.t Stdlib.Atomic.t -> StrMap.key list Deferred.t
val is_member : 'a StrMap.t Stdlib.Atomic.t -> StrMap.key -> bool Deferred.t
val erase : 'a StrMap.t Stdlib.Atomic.t -> StrMap.key -> unit Deferred.t
val size : string StrMap.t Stdlib.Atomic.t -> StrMap.key -> int Deferred.t
val erase_prefix : 'a StrMap.t Stdlib.Atomic.t -> string -> unit Deferred.t
val get_partial_values : + string StrMap.t Stdlib.Atomic.t -> + StrMap.key -> + (int * int option) list -> + string list Deferred.t
val set_partial_values : + string StrMap.t Stdlib.Atomic.t -> + StrMap.key -> + ?append:bool -> + (int * string) list -> + unit Deferred.t
val list_prefix : + 'a StrMap.t Stdlib.Atomic.t -> + string -> + StrMap.key list Deferred.t
val list_dir : + 'a StrMap.t Stdlib.Atomic.t -> + string -> + (Stdlib.String.t list * Stdlib.String.t list) Deferred.t
diff --git a/zarr/Zarr/Memory/StrMap/index.html b/zarr/Zarr/Memory/StrMap/index.html new file mode 100644 index 00000000..8efa3b9b --- /dev/null +++ b/zarr/Zarr/Memory/StrMap/index.html @@ -0,0 +1,6 @@ + +StrMap (zarr.Zarr.Memory.StrMap)

Module Memory.StrMap

type key = string
type !+'a t
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val add_to_list : key -> 'a -> 'a list t -> 'a list t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val split : key -> 'a t -> 'a t * 'a option * 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
diff --git a/zarr/Zarr/Memory/index.html b/zarr/Zarr/Memory/index.html new file mode 100644 index 00000000..713d937e --- /dev/null +++ b/zarr/Zarr/Memory/index.html @@ -0,0 +1,2 @@ + +Memory (zarr.Zarr.Memory)

Module Zarr.Memory

module StrMap : sig ... end
val create : unit -> 'a StrMap.t Stdlib.Atomic.t
module Make (Deferred : Types.Deferred) : sig ... end
diff --git a/zarr/Zarr/Metadata/ArrayMetadata/index.html b/zarr/Zarr/Metadata/ArrayMetadata/index.html new file mode 100644 index 00000000..afe52747 --- /dev/null +++ b/zarr/Zarr/Metadata/ArrayMetadata/index.html @@ -0,0 +1,11 @@ + +ArrayMetadata (zarr.Zarr.Metadata.ArrayMetadata)

Module Metadata.ArrayMetadata

A module which contains functionality to work with a parsed JSON Zarr array metadata document.

type t

A type representing a parsed array metadata document.

val create : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Codecs.Chain.t -> + shape:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + int array -> + t

create ~codecs ~shape kind fv cshp Creates a new array metadata document with codec chain codecs, shape shape, fill value fv, data type kind and chunk shape cshp.

  • raises Failure

    if shape and chunks are incompatible.

val encode : t -> string

encode t returns a byte string representing a JSON Zarr array metadata.

val decode : string -> t

decode s decodes a bytes string s into a ArrayMetadata.t type.

  • raises Failure

    if metadata string is invalid.

val shape : t -> int array

shape t returns the shape of the zarr array represented by metadata type t.

val chunk_shape : t -> int array

chunk_shape t returns the shape a chunk in this zarr array.

val is_valid_kind : t -> ('a, 'b) Stdlib.Bigarray.kind -> bool

is_valid_kind t kind checks if kind is a valid Bigarray kind that matches the data type of the zarr array represented by this metadata type.

val fillvalue_of_kind : t -> ('a, 'b) Stdlib.Bigarray.kind -> 'a

fillvalue_of_kind t kind returns the fill value of uninitialized chunks in this zarr array given kind. Raises Failure if the kind is not compatible with this array's fill value.

val attributes : t -> Yojson.Safe.t

attributes t Returns a Yojson type containing user attributes assigned to the zarr array represented by t.

val dimension_names : t -> string option list

dimension_name t returns a list of dimension names. If none are defined then an empty list is returned.

val codecs : t -> Codecs.Chain.t

codecs t Returns a type representing the chain of codecs applied when decoding/encoding a Zarr array chunk.

val index_coord_pair : t -> int array -> int array * int array

index_coord_pair t coord maps a coordinate of this Zarr array to a pair of chunk index and coordinate within that chunk.

val chunk_indices : t -> int array -> int array list

chunk_indices t shp returns a list of all chunk indices that would be contained in a zarr array of shape shp given the regular grid defined in array metadata t.

val chunk_key : t -> int array -> string

chunk_key t idx returns a key encoding of a the chunk index idx.

val update_attributes : t -> Yojson.Safe.t -> t

update_attributes t json returns a new metadata type with an updated attribute field containing contents in json

val update_shape : t -> int array -> t

update_shape t new_shp returns a new metadata type containing shape new_shp.

val (=) : t -> t -> bool

a = b returns true if a b are equal array metadata documents and false otherwise.

diff --git a/zarr/Zarr/Metadata/FillValue/index.html b/zarr/Zarr/Metadata/FillValue/index.html new file mode 100644 index 00000000..8c170b01 --- /dev/null +++ b/zarr/Zarr/Metadata/FillValue/index.html @@ -0,0 +1,2 @@ + +FillValue (zarr.Zarr.Metadata.FillValue)

Module Metadata.FillValue

type t =
  1. | Char of char
    (*

    A single character string.

    *)
  2. | Bool of bool
    (*

    Must be a JSON boolean.

    *)
  3. | Int of int64
    (*

    Value must be a JSON number with no fractional or exponent part that is within the representable range of the corresponding integer data type.

    *)
  4. | Float of float
    (*

    Value representing a JSON float.

    *)
  5. | FloatBits of float
    (*

    A JSON string specifying a byte representation of the float a hexstring.

    *)
  6. | IntComplex of Stdlib.Complex.t
    (*

    A JSON 2-element array of integers representing a complex number.

    *)
  7. | FloatComplex of Stdlib.Complex.t
    (*

    A JSON 2-element array of floats representing a complex number.

    *)
  8. | FFComplex of Stdlib.Complex.t
  9. | FBComplex of Stdlib.Complex.t
  10. | BFComplex of Stdlib.Complex.t
  11. | BBComplex of Stdlib.Complex.t
    (*

    Provides an element value to use for uninitialised portions of a Zarr array. The permitted values depend on the data type.

    *)
diff --git a/zarr/Zarr/Metadata/GroupMetadata/index.html b/zarr/Zarr/Metadata/GroupMetadata/index.html new file mode 100644 index 00000000..447f267d --- /dev/null +++ b/zarr/Zarr/Metadata/GroupMetadata/index.html @@ -0,0 +1,2 @@ + +GroupMetadata (zarr.Zarr.Metadata.GroupMetadata)

Module Metadata.GroupMetadata

A module which contains functionality to work with a parsed JSON Zarr group metadata document.

type t

A type representing a parsed group metadata document.

val default : t

Return a group metadata type with default values for all fields.

val encode : t -> string

encode t returns a byte string representing a JSON Zarr group metadata.

val decode : string -> t

decode s decodes a bytes string s into a t type.

  • raises Failure

    if metadata string is invalid.

val update_attributes : t -> Yojson.Safe.t -> t

update_attributes t json returns a new metadata type with an updated attribute field containing contents in json.

val show : t -> string

show t pretty-prints the contents of the group metadata type t.

val attributes : t -> Yojson.Safe.t

attributes t Returns a Yojson type containing user attributes assigned to the zarr group represented by t.

diff --git a/zarr/Zarr/Metadata/index.html b/zarr/Zarr/Metadata/index.html new file mode 100644 index 00000000..0fdab475 --- /dev/null +++ b/zarr/Zarr/Metadata/index.html @@ -0,0 +1,2 @@ + +Metadata (zarr.Zarr.Metadata)

Module Zarr.Metadata

This module provides functionality for manipulating a Zarr node's metadata JSON document.

The Zarr V3 specification defines two types of metadata documents: array and group metadata. Both types are stored under the key zarr.json within the prefix of a group or array.

module FillValue : sig ... end
module ArrayMetadata : sig ... end

A module which contains functionality to work with a parsed JSON Zarr array metadata document.

module GroupMetadata : sig ... end

A module which contains functionality to work with a parsed JSON Zarr group metadata document.

diff --git a/zarr/Zarr/Node/ArrayNode/index.html b/zarr/Zarr/Node/ArrayNode/index.html index afb79d3e..7db8f40a 100644 --- a/zarr/Zarr/Node/ArrayNode/index.html +++ b/zarr/Zarr/Node/ArrayNode/index.html @@ -1,2 +1,2 @@ -ArrayNode (zarr.Zarr.Node.ArrayNode)

Module Node.ArrayNode

type t

The type of an array node.

val create : GroupNode.t -> string -> (t, [> error ]) Stdlib.result

create p n returns an array node with parent p and name n or an error if this operation fails.

val (/) : GroupNode.t -> string -> (t, [> error ]) Stdlib.result

The infix operator alias of ArrayNode.create

val of_path : string -> (t, [> error ]) Stdlib.result

of_path s returns an array node from string s or an error upon failure.

val to_path : t -> string

to_path n returns array node n as a string path.

val name : t -> string

name n returns the name of array node n.

val parent : t -> GroupNode.t

parent n returns parent group node of n.

val (=) : t -> t -> bool

x = y returns true if nodes x and y are equal, and false otherwise.

val ancestors : t -> GroupNode.t list

ancestors n returns ancestor group nodes of n.

val is_parent : t -> GroupNode.t -> bool

is_parent n g returns true if group node g is the immediate parent of array node n and false otherwise.

val to_key : t -> string

to_key n converts a node's path to a key, as defined in the Zarr V3 specification.

val to_metakey : t -> string

to_prefix n returns the metadata key associated with node n, as defined in the Zarr V3 specification.

val show : t -> string

show n returns a string representation of a node type.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t pretty prints a node type value.

+ArrayNode (zarr.Zarr.Node.ArrayNode)

Module Node.ArrayNode

type t

The type of an array node.

val create : GroupNode.t -> string -> t

create p n returns an array node with parent p and name n.

  • raises Failure

    if node invariants are not satisfied.

val (/) : GroupNode.t -> string -> t

The infix operator alias of ArrayNode.create

val of_path : string -> t

of_path s returns an array node from string s.

  • raises Failure

    if node invariants are not satisfied.

val to_path : t -> string

to_path n returns array node n as a string path.

val name : t -> string

name n returns the name of array node n.

val parent : t -> GroupNode.t

parent n returns parent group node of n.

val (=) : t -> t -> bool

x = y returns true if nodes x and y are equal, and false otherwise.

val ancestors : t -> GroupNode.t list

ancestors n returns ancestor group nodes of n.

val is_parent : t -> GroupNode.t -> bool

is_parent n g returns true if group node g is the immediate parent of array node n and false otherwise.

val to_key : t -> string

to_key n converts a node's path to a key, as defined in the Zarr V3 specification.

val to_metakey : t -> string

to_prefix n returns the metadata key associated with node n, as defined in the Zarr V3 specification.

val show : t -> string

show n returns a string representation of a node type.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t pretty prints a node type value.

diff --git a/zarr/Zarr/Node/GroupNode/index.html b/zarr/Zarr/Node/GroupNode/index.html index ea156477..d5e2e662 100644 --- a/zarr/Zarr/Node/GroupNode/index.html +++ b/zarr/Zarr/Node/GroupNode/index.html @@ -1,2 +1,2 @@ -GroupNode (zarr.Zarr.Node.GroupNode)

Module Node.GroupNode

type t

The type of a Group node.

val root : t

creates the root node

val create : t -> string -> (t, [> error ]) Stdlib.result

create p n returns a group node with parent p and name n or an error if this operation fails.

val (/) : t -> string -> (t, [> error ]) Stdlib.result

The infix operator alias of create

val of_path : string -> (t, [> error ]) Stdlib.result

of_path s returns a node from string s or an error upon failure.

val to_path : t -> string

to_path n returns node n as a string path.

val name : t -> string

name n returns the name of node n. The root node does not have a name and thus the empty string "" is returned if n is a root node.

val parent : t -> t option

parent n returns Some p where p is the parent node of n of None if node n is the root node.

val (=) : t -> t -> bool

x = y returns true if nodes x and y are equal, and false otherwise.

val ancestors : t -> t list

ancestors n returns ancestor nodes of n including the root node. The root node has no ancestors, thus this returns the empty list is called on a root node.

val to_key : t -> string

to_key n converts a node's path to a key, as defined in the Zarr V3 specification.

val to_prefix : t -> string

to_prefix n converts a node's path to a prefix key, as defined in the Zarr V3 specification.

val to_metakey : t -> string

to_prefix n returns the metadata key associated with node n, as defined in the Zarr V3 specification.

val is_child_group : t -> t -> bool

is_child_group m n Tests if group node m is a the immediate parent of group node n. Returns true when the test passes and false otherwise.

val show : t -> string

show n returns a string representation of a node type.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t pretty prints a node type value.

+GroupNode (zarr.Zarr.Node.GroupNode)

Module Node.GroupNode

type t

The type of a Group node.

val root : t

creates the root node

val create : t -> string -> t

create p n returns a group node with parent p and name n.

  • raises Failure

    if node invariants are not satisfied.

val (/) : t -> string -> t

The infix operator alias of create

val of_path : string -> t

of_path s returns a node from string s.

  • raises Failure

    if node invariants are not satisfied.

val to_path : t -> string

to_path n returns node n as a string path.

val name : t -> string

name n returns the name of node n. The root node does not have a name and thus the empty string "" is returned if n is a root node.

val parent : t -> t option

parent n returns Some p where p is the parent node of n of None if node n is the root node.

val (=) : t -> t -> bool

x = y returns true if nodes x and y are equal, and false otherwise.

val ancestors : t -> t list

ancestors n returns ancestor nodes of n including the root node. The root node has no ancestors, thus this returns the empty list is called on a root node.

val to_key : t -> string

to_key n converts a node's path to a key, as defined in the Zarr V3 specification.

val to_prefix : t -> string

to_prefix n converts a node's path to a prefix key, as defined in the Zarr V3 specification.

val to_metakey : t -> string

to_prefix n returns the metadata key associated with node n, as defined in the Zarr V3 specification.

val is_child_group : t -> t -> bool

is_child_group m n Tests if group node m is a the immediate parent of group node n. Returns true when the test passes and false otherwise.

val show : t -> string

show n returns a string representation of a node type.

val pp : Stdlib.Format.formatter -> t -> unit

pp fmt t pretty prints a node type value.

diff --git a/zarr/Zarr/Node/index.html b/zarr/Zarr/Node/index.html index 3557200e..426166ff 100644 --- a/zarr/Zarr/Node/index.html +++ b/zarr/Zarr/Node/index.html @@ -1,2 +1,2 @@ -Node (zarr.Zarr.Node)

Module Zarr.Node

This module provides functionality for manipulating Zarr nodes.

A Zarr V3 node is associated with either a group or an array. All nodes in a hierarchy have a name and a path. The root node does not have a name and is the empty string "". Except for the root node, each node in a hierarchy must have a name, which is a string of unicode code points. The following constraints apply to node names:

type error = [
  1. | `Node_invariant of string
]

The error type for operations on node types. It is returned by functions that create an array or group node type when one or more of a node's invariants are not satisfied as defined in the Zarr V3 specification.

module GroupNode : sig ... end
module ArrayNode : sig ... end
+Node (zarr.Zarr.Node)

Module Zarr.Node

This module provides functionality for manipulating Zarr nodes.

A Zarr V3 node is associated with either a group or an array. All nodes in a hierarchy have a name and a path. The root node does not have a name and is the empty string "". Except for the root node, each node in a hierarchy must have a name, which is a string of unicode code points. The following constraints apply to node names:

module GroupNode : sig ... end
module ArrayNode : sig ... end
diff --git a/zarr/Zarr/Storage/FilesystemStore/index.html b/zarr/Zarr/Storage/FilesystemStore/index.html deleted file mode 100644 index b386153d..00000000 --- a/zarr/Zarr/Storage/FilesystemStore/index.html +++ /dev/null @@ -1,48 +0,0 @@ - -FilesystemStore (zarr.Zarr.Storage.FilesystemStore)

Module Storage.FilesystemStore

A local filesystem storage backend for a Zarr V3 hierarchy.

include S
type t

The storage type.

val create_group : ?attrs:Yojson.Safe.t -> t -> Node.GroupNode.t -> unit

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : - ?sep:[< `Dot | `Slash Slash ] -> - ?dimension_names:string option list -> - ?attributes:Yojson.Safe.t -> - codecs:Codecs.codec_chain -> - shape:int array -> - chunks:int array -> - ('a, 'b) Stdlib.Bigarray.kind -> - 'a -> - Node.ArrayNode.t -> - t -> - (unit, [> Codecs.error | Zarr__.Extensions.error | Zarr__.Metadata.error ]) - Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : - t -> - Node.ArrayNode.t -> - (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if node is not a member of store t.

val group_metadata : - t -> - Node.GroupNode.t -> - (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if node is not a member of store t.

val find_child_nodes : - t -> - Node.GroupNode.t -> - Node.ArrayNode.t list * Node.GroupNode.t list

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : t -> Node.ArrayNode.t list * Node.GroupNode.t list

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. If the store has no nodes, None is returned.

val erase_group_node : t -> Node.GroupNode.t -> unit

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (unit, [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b) Stdlib.Bigarray.kind -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : - t -> - Node.ArrayNode.t -> - int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if shape does not have the same dimensions as n's shape. If node n is not a member of store t then this is a no-op.

val create : ?file_perm:Unix.file_perm -> string -> t

create ~file_perm path returns a new filesystem Zarr V3 store. This * operatioin fails if path is a directory that already exists.

val open_store : - ?file_perm:Unix.file_perm -> - string -> - (t, error) Stdlib.result

open_store ~file_perm path returns an existing filesystem Zarr V3 store. * This operatioin fails if path is not a Zarr store path.

val open_or_create : - ?file_perm:Unix.file_perm -> - string -> - (t, error) Stdlib.result

open_or_create ~file_perm path returns an existing filesystem store * and creates it if it does not exist at path path. See documentation * for open_store and create for more information.

diff --git a/zarr/Zarr/Storage/Make/Deferred/Infix/index.html b/zarr/Zarr/Storage/Make/Deferred/Infix/index.html new file mode 100644 index 00000000..5903d799 --- /dev/null +++ b/zarr/Zarr/Storage/Make/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Storage.Make.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Storage/Make/Deferred/index.html b/zarr/Zarr/Storage/Make/Deferred/index.html new file mode 100644 index 00000000..3ed54235 --- /dev/null +++ b/zarr/Zarr/Storage/Make/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Storage.Make.Deferred)

Module Make.Deferred

type 'a t = 'a Io.Deferred.t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/Infix/index.html b/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/Infix/index.html new file mode 100644 index 00000000..1c94b6c2 --- /dev/null +++ b/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Storage.Make.Io.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/index.html b/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/index.html new file mode 100644 index 00000000..a1e98280 --- /dev/null +++ b/zarr/Zarr/Storage/Make/argument-1-Io/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Storage.Make.Io.Deferred)

Module Io.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Storage/Make/argument-1-Io/index.html b/zarr/Zarr/Storage/Make/argument-1-Io/index.html new file mode 100644 index 00000000..b9443352 --- /dev/null +++ b/zarr/Zarr/Storage/Make/argument-1-Io/index.html @@ -0,0 +1,14 @@ + +Io (zarr.Zarr.Storage.Make.Io)

Parameter Make.Io

The abstract store interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a "/". In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. (i.e. a store is a mapping from keys to values). It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> Types.key -> int Deferred.t
val get_partial_values : + t -> + string -> + Types.range list -> + Types.value list Deferred.t
val set : t -> Types.key -> Types.value -> unit Deferred.t
val set_partial_values : + t -> + Types.key -> + ?append:bool -> + (Types.range_start * Types.value) list -> + unit Deferred.t
val erase : t -> Types.key -> unit Deferred.t
val erase_prefix : t -> Types.key -> unit Deferred.t
val list : t -> Types.key list Deferred.t
val list_prefix : t -> Types.key -> Types.key list Deferred.t
val list_dir : + t -> + Types.key -> + (Types.key list * Types.prefix list) Deferred.t
val is_member : t -> Types.key -> bool Deferred.t
diff --git a/zarr/Zarr/Storage/Make/argument-1-M/index.html b/zarr/Zarr/Storage/Make/argument-1-M/index.html deleted file mode 100644 index 1bfc2184..00000000 --- a/zarr/Zarr/Storage/Make/argument-1-M/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -M (zarr.Zarr.Storage.Make.M)

Parameter Make.M

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> string -> int
val get : t -> string -> (string, [> `Store_read of string ]) Stdlib.result
val get_partial_values : - t -> - string -> - (int * int option) list -> - (string list, [> `Store_read of string ]) Stdlib.result
val set : t -> string -> string -> unit
val set_partial_values : - t -> - string -> - ?append:bool -> - (int * string) list -> - unit
val erase : t -> string -> unit
val erase_prefix : t -> string -> unit
val list : t -> string list
val list_prefix : t -> string -> string list
val list_dir : t -> string -> string list * string list
val is_member : t -> string -> bool
diff --git a/zarr/Zarr/Storage/Make/index.html b/zarr/Zarr/Storage/Make/index.html index 65920f62..b590c3a0 100644 --- a/zarr/Zarr/Storage/Make/index.html +++ b/zarr/Zarr/Storage/Make/index.html @@ -1,5 +1,9 @@ -Make (zarr.Zarr.Storage.Make)

Module Storage.Make

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

Parameters

module M : sig ... end

Signature

type t = M.t

The storage type.

val create_group : ?attrs:Yojson.Safe.t -> t -> Node.GroupNode.t -> unit

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : +Make (zarr.Zarr.Storage.Make)

Module Storage.Make

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

Parameters

module Io : Types.IO

Signature

module Deferred : Types.Deferred with type 'a t = 'a Io.Deferred.t
type t = Io.t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> + t -> + Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : ?sep:[< `Dot | `Slash Slash ] -> ?dimension_names:string option list -> ?attributes:Yojson.Safe.t -> @@ -10,33 +14,25 @@ 'a -> Node.ArrayNode.t -> t -> - (unit, [> Codecs.error | Zarr__.Extensions.error | Zarr__.Metadata.error ]) - Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : + unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

val array_metadata : t -> Node.ArrayNode.t -> - (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if node is not a member of store t.

val group_metadata : + Metadata.ArrayMetadata.t Deferred.t

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

val group_metadata : t -> Node.GroupNode.t -> - (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if node is not a member of store t.

val find_child_nodes : + Metadata.GroupMetadata.t Deferred.t

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : t -> Node.GroupNode.t -> - Node.ArrayNode.t list * Node.GroupNode.t list

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : t -> Node.ArrayNode.t list * Node.GroupNode.t list

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. If the store has no nodes, None is returned.

val erase_group_node : t -> Node.GroupNode.t -> unit

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + (Node.ArrayNode.t list * Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Node.ArrayNode.t list * Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : t -> Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (unit, [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : t -> Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : - t -> - Node.ArrayNode.t -> - int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if shape does not have the same dimensions as n's shape. If node n is not a member of store t then this is a no-op.

+ ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
diff --git a/zarr/Zarr/Storage/MemoryStore/index.html b/zarr/Zarr/Storage/MemoryStore/index.html deleted file mode 100644 index e70e6d1b..00000000 --- a/zarr/Zarr/Storage/MemoryStore/index.html +++ /dev/null @@ -1,42 +0,0 @@ - -MemoryStore (zarr.Zarr.Storage.MemoryStore)

Module Storage.MemoryStore

An in-memory storage backend for Zarr V3 hierarchy.

include S
type t

The storage type.

val create_group : ?attrs:Yojson.Safe.t -> t -> Node.GroupNode.t -> unit

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : - ?sep:[< `Dot | `Slash Slash ] -> - ?dimension_names:string option list -> - ?attributes:Yojson.Safe.t -> - codecs:Codecs.codec_chain -> - shape:int array -> - chunks:int array -> - ('a, 'b) Stdlib.Bigarray.kind -> - 'a -> - Node.ArrayNode.t -> - t -> - (unit, [> Codecs.error | Zarr__.Extensions.error | Zarr__.Metadata.error ]) - Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : - t -> - Node.ArrayNode.t -> - (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if node is not a member of store t.

val group_metadata : - t -> - Node.GroupNode.t -> - (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if node is not a member of store t.

val find_child_nodes : - t -> - Node.GroupNode.t -> - Node.ArrayNode.t list * Node.GroupNode.t list

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : t -> Node.ArrayNode.t list * Node.GroupNode.t list

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. If the store has no nodes, None is returned.

val erase_group_node : t -> Node.GroupNode.t -> unit

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (unit, [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b) Stdlib.Bigarray.kind -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : - t -> - Node.ArrayNode.t -> - int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if shape does not have the same dimensions as n's shape. If node n is not a member of store t then this is a no-op.

val create : unit -> t

create () returns a new In-memory Zarr V3 store.

diff --git a/zarr/Zarr/Storage/index.html b/zarr/Zarr/Storage/index.html index ec3b7754..f84af436 100644 --- a/zarr/Zarr/Storage/index.html +++ b/zarr/Zarr/Storage/index.html @@ -1,2 +1,4 @@ -Storage (zarr.Zarr.Storage)

Module Zarr.Storage

type error

The error type of supported storage backends.

module type S = sig ... end

The public interface of all supported stores.

module type STORE = sig ... end

The module interface that all supported stores must implement.

module type MAKER = sig ... end
module Make : MAKER

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

module MemoryStore : sig ... end

An in-memory storage backend for Zarr V3 hierarchy.

module FilesystemStore : sig ... end

A local filesystem storage backend for a Zarr V3 hierarchy.

+Storage (zarr.Zarr.Storage)

Module Zarr.Storage

module type STORE = sig ... end

The module interface that all supported stores must implement.

module Make + (Io : Types.IO) : + STORE with type t = Io.t and type 'a Deferred.t = 'a Io.Deferred.t

A functor for minting a new storage type as long as it's argument module implements the STORE interface.

diff --git a/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html b/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html deleted file mode 100644 index 465b21b0..00000000 --- a/zarr/Zarr/Storage/module-type-MAKER/argument-1-M/index.html +++ /dev/null @@ -1,11 +0,0 @@ - -M (zarr.Zarr.Storage.MAKER.M)

Parameter MAKER.M

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> string -> int
val get : t -> string -> (string, [> `Store_read of string ]) Stdlib.result
val get_partial_values : - t -> - string -> - (int * int option) list -> - (string list, [> `Store_read of string ]) Stdlib.result
val set : t -> string -> string -> unit
val set_partial_values : - t -> - string -> - ?append:bool -> - (int * string) list -> - unit
val erase : t -> string -> unit
val erase_prefix : t -> string -> unit
val list : t -> string list
val list_prefix : t -> string -> string list
val list_dir : t -> string -> string list * string list
val is_member : t -> string -> bool
diff --git a/zarr/Zarr/Storage/module-type-MAKER/index.html b/zarr/Zarr/Storage/module-type-MAKER/index.html deleted file mode 100644 index 9b87d093..00000000 --- a/zarr/Zarr/Storage/module-type-MAKER/index.html +++ /dev/null @@ -1,42 +0,0 @@ - -MAKER (zarr.Zarr.Storage.MAKER)

Module type Storage.MAKER

Parameters

module M : sig ... end

Signature

type t = M.t

The storage type.

val create_group : ?attrs:Yojson.Safe.t -> t -> Node.GroupNode.t -> unit

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : - ?sep:[< `Dot | `Slash Slash ] -> - ?dimension_names:string option list -> - ?attributes:Yojson.Safe.t -> - codecs:Codecs.codec_chain -> - shape:int array -> - chunks:int array -> - ('a, 'b) Stdlib.Bigarray.kind -> - 'a -> - Node.ArrayNode.t -> - t -> - (unit, [> Codecs.error | Zarr__.Extensions.error | Zarr__.Metadata.error ]) - Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : - t -> - Node.ArrayNode.t -> - (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if node is not a member of store t.

val group_metadata : - t -> - Node.GroupNode.t -> - (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if node is not a member of store t.

val find_child_nodes : - t -> - Node.GroupNode.t -> - Node.ArrayNode.t list * Node.GroupNode.t list

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : t -> Node.ArrayNode.t list * Node.GroupNode.t list

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. If the store has no nodes, None is returned.

val erase_group_node : t -> Node.GroupNode.t -> unit

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (unit, [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b) Stdlib.Bigarray.kind -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : - t -> - Node.ArrayNode.t -> - int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if shape does not have the same dimensions as n's shape. If node n is not a member of store t then this is a no-op.

diff --git a/zarr/Zarr/Storage/module-type-S/index.html b/zarr/Zarr/Storage/module-type-S/index.html deleted file mode 100644 index 4caac60e..00000000 --- a/zarr/Zarr/Storage/module-type-S/index.html +++ /dev/null @@ -1,42 +0,0 @@ - -S (zarr.Zarr.Storage.S)

Module type Storage.S

The public interface of all supported stores.

type t

The storage type.

val create_group : ?attrs:Yojson.Safe.t -> t -> Node.GroupNode.t -> unit

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : - ?sep:[< `Dot | `Slash Slash ] -> - ?dimension_names:string option list -> - ?attributes:Yojson.Safe.t -> - codecs:Codecs.codec_chain -> - shape:int array -> - chunks:int array -> - ('a, 'b) Stdlib.Bigarray.kind -> - 'a -> - Node.ArrayNode.t -> - t -> - (unit, [> Codecs.error | Zarr__.Extensions.error | Zarr__.Metadata.error ]) - Stdlib.result

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.

This operation can fail if the codec chain is not well defined.

val array_metadata : - t -> - Node.ArrayNode.t -> - (Zarr__.Metadata.ArrayMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

array_metadata node t returns the metadata of array node node. This operation returns an error if node is not a member of store t.

val group_metadata : - t -> - Node.GroupNode.t -> - (Zarr__.Metadata.GroupMetadata.t, [> Zarr__.Storage_intf.error ]) - Stdlib.result

group_metadata node t returns the metadata of group node node. This operation returns an error if node is not a member of store t.

val find_child_nodes : - t -> - Node.GroupNode.t -> - Node.ArrayNode.t list * Node.GroupNode.t list

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : t -> Node.ArrayNode.t list * Node.GroupNode.t list

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. If the store has no nodes, None is returned.

val erase_group_node : t -> Node.GroupNode.t -> unit

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> - (unit, [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t. This operation fails if:

  • the ndarray x size does not equal slice s.
  • the kind of x is not compatible with node n's data type as described in its metadata document.
  • If there is a problem decoding/encoding node n chunks.
val get_array : - t -> - Node.ArrayNode.t -> - Owl_types.index array -> - ('a, 'b) Stdlib.Bigarray.kind -> - (('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t, - [> Zarr__.Storage_intf.error | Node.error | Codecs.error ]) - Stdlib.result

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n. This operation fails if:

  • If there is a problem decoding/encoding node n chunks.
  • kind k is not compatible with node n's data type as described in its metadata document.
  • The slice s is not a valid slice of array node n.
val reshape : - t -> - Node.ArrayNode.t -> - int array -> - (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

reshape t n shape resizes array node n of store t into new size shape. If this operation fails, an error is returned. It can fail if shape does not have the same dimensions as n's shape. If node n is not a member of store t then this is a no-op.

diff --git a/zarr/Zarr/Storage/module-type-STORE/Deferred/Infix/index.html b/zarr/Zarr/Storage/module-type-STORE/Deferred/Infix/index.html new file mode 100644 index 00000000..bfa3b5fd --- /dev/null +++ b/zarr/Zarr/Storage/module-type-STORE/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Storage.STORE.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Storage/module-type-STORE/Deferred/index.html b/zarr/Zarr/Storage/module-type-STORE/Deferred/index.html new file mode 100644 index 00000000..6f8e2993 --- /dev/null +++ b/zarr/Zarr/Storage/module-type-STORE/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Storage.STORE.Deferred)

Module STORE.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Storage/module-type-STORE/index.html b/zarr/Zarr/Storage/module-type-STORE/index.html index 01e383e2..5c08ea4a 100644 --- a/zarr/Zarr/Storage/module-type-STORE/index.html +++ b/zarr/Zarr/Storage/module-type-STORE/index.html @@ -1,11 +1,38 @@ -STORE (zarr.Zarr.Storage.STORE)

Module type Storage.STORE

The module interface that all supported stores must implement.

The abstract STORE interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a / character. In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. I.e., a store is a mapping from keys to values. It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> string -> int
val get : t -> string -> (string, [> `Store_read of string ]) Stdlib.result
val get_partial_values : +STORE (zarr.Zarr.Storage.STORE)

Module type Storage.STORE

The module interface that all supported stores must implement.

type t

The storage type.

val create_group : + ?attrs:Yojson.Safe.t -> t -> - string -> - (int * int option) list -> - (string list, [> `Store_read of string ]) Stdlib.result
val set : t -> string -> string -> unit
val set_partial_values : + Node.GroupNode.t -> + unit Deferred.t

create_group ?attrs t node creates a group node in store t containing attributes attrs. This is a no-op if node is already a member of this store.

val create_array : + ?sep:[< `Dot | `Slash Slash ] -> + ?dimension_names:string option list -> + ?attributes:Yojson.Safe.t -> + codecs:Codecs.codec_chain -> + shape:int array -> + chunks:int array -> + ('a, 'b) Stdlib.Bigarray.kind -> + 'a -> + Node.ArrayNode.t -> t -> - string -> - ?append:bool -> - (int * string) list -> - unit
val erase : t -> string -> unit
val erase_prefix : t -> string -> unit
val list : t -> string list
val list_prefix : t -> string -> string list
val list_dir : t -> string -> string list * string list
val is_member : t -> string -> bool
+ unit Deferred.t

create_array ~sep ~dimension_names ~attributes ~codecs ~shape ~chunks kind fill node t creates an array node in store t where:

  • Separator sep is used in the array's chunk key encoding.
  • Dimension names dimension_names and user attributes attributes are included in it's metadata document.
  • A codec chain defined by codecs.
  • The array has shape shape and chunk shape chunks.
  • The array has data kind kind and fill value fv.
  • raises Failure

    if the codec chain is not well defined.

val array_metadata : + t -> + Node.ArrayNode.t -> + Metadata.ArrayMetadata.t Deferred.t

array_metadata node t returns the metadata of array node node.

  • raises Failure

    if node is not a member of store t.

val group_metadata : + t -> + Node.GroupNode.t -> + Metadata.GroupMetadata.t Deferred.t

group_metadata node t returns the metadata of group node node.

  • raises Failure

    if node is not a member of store t.

val find_child_nodes : + t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list) Deferred.t

find_child_nodes t n returns a tuple of child nodes of group node n. This operation returns a pair of empty lists if node n has no children or is not a member of store t.

val find_all_nodes : + t -> + (Node.ArrayNode.t list * Node.GroupNode.t list) Deferred.t

find_all_nodes t returns Some p where p is a pair of lists representing all nodes in store t. The first element of the pair is a list of all array nodes, and the second element is a list of all group nodes. This operation returns a pair of empty lists if store t is empty.

val erase_group_node : t -> Node.GroupNode.t -> unit Deferred.t

erase_group_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_array_node : t -> Node.ArrayNode.t -> unit Deferred.t

erase_array_node t n erases group node n from store t. This also erases all child nodes of n. If node n is not a member of store t then this is a no-op.

val erase_all_nodes : t -> unit Deferred.t

erase_all_nodes t clears the store t by deleting all nodes. If the store is already empty, this is a no-op.

val group_exists : t -> Node.GroupNode.t -> bool Deferred.t

group_exists t n returns true if group node n is a member of store t and false otherwise.

val array_exists : t -> Node.ArrayNode.t -> bool Deferred.t

array_exists t n returns true if array node n is a member of store t and false otherwise.

val set_array : + t -> + Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t -> + unit Deferred.t

set_array t n s x writes n-dimensional array x to the slice s of array node n in store t.

  • raises Failure
    • if the ndarray x size does not equal slice s.
    • if the kind of x is not compatible with node n's data type as described in its metadata document.
    • if there is a problem decoding/encoding node n chunks.
val get_array : + t -> + Node.ArrayNode.t -> + Owl_types.index array -> + ('a, 'b) Stdlib.Bigarray.kind -> + ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Genarray.t Deferred.t

get_array t n s k reads an n-dimensional array of size determined by slice s from array node n.

  • raises Failure
    • if there is a problem decoding/encoding node n chunks.
    • if kind k is not compatible with node n's data type as described in its metadata document.
    • if the slice s is not a valid slice of array node n.
val reshape : t -> Node.ArrayNode.t -> int array -> unit Deferred.t

reshape t n shape resizes array node n of store t into new size shape.

  • raises Failure
    • if shape does not have the same dimensions as n's shape.
    • if node n is not a member of store t then this is a no-op.
diff --git a/zarr/Zarr/Types/index.html b/zarr/Zarr/Types/index.html new file mode 100644 index 00000000..7995f185 --- /dev/null +++ b/zarr/Zarr/Types/index.html @@ -0,0 +1,2 @@ + +Types (zarr.Zarr.Types)

Module Zarr.Types

module type Deferred = sig ... end
type key = string
type range = int * int option
type value = string
type range_start = int
type prefix = string
module type IO = sig ... end

The abstract store interface that stores should implement.

diff --git a/zarr/Zarr/Types/module-type-Deferred/Infix/index.html b/zarr/Zarr/Types/module-type-Deferred/Infix/index.html new file mode 100644 index 00000000..f6bad934 --- /dev/null +++ b/zarr/Zarr/Types/module-type-Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Types.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Types/module-type-Deferred/index.html b/zarr/Zarr/Types/module-type-Deferred/index.html new file mode 100644 index 00000000..362b98a8 --- /dev/null +++ b/zarr/Zarr/Types/module-type-Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Types.Deferred)

Module type Types.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Types/module-type-IO/Deferred/Infix/index.html b/zarr/Zarr/Types/module-type-IO/Deferred/Infix/index.html new file mode 100644 index 00000000..5704fcfc --- /dev/null +++ b/zarr/Zarr/Types/module-type-IO/Deferred/Infix/index.html @@ -0,0 +1,2 @@ + +Infix (zarr.Zarr.Types.IO.Deferred.Infix)

Module Deferred.Infix

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
diff --git a/zarr/Zarr/Types/module-type-IO/Deferred/index.html b/zarr/Zarr/Types/module-type-IO/Deferred/index.html new file mode 100644 index 00000000..c0d92cbb --- /dev/null +++ b/zarr/Zarr/Types/module-type-IO/Deferred/index.html @@ -0,0 +1,2 @@ + +Deferred (zarr.Zarr.Types.IO.Deferred)

Module IO.Deferred

type 'a t
val return : 'a -> 'a t
val iter : ('a -> unit t) -> 'a list -> unit t
val fold_left : ('acc -> 'a -> 'acc t) -> 'acc -> 'a list -> 'acc t
module Infix : sig ... end
diff --git a/zarr/Zarr/Types/module-type-IO/index.html b/zarr/Zarr/Types/module-type-IO/index.html new file mode 100644 index 00000000..adaa025b --- /dev/null +++ b/zarr/Zarr/Types/module-type-IO/index.html @@ -0,0 +1,7 @@ + +IO (zarr.Zarr.Types.IO)

Module type Types.IO

The abstract store interface that stores should implement.

The store interface defines a set of operations involving keys and values. In the context of this interface, a key is a Unicode string, where the final character is not a "/". In general, a value is a sequence of bytes. Specific stores may choose more specific storage formats, which must be stated in the specification of the respective store.

It is assumed that the store holds (key, value) pairs, with only one such pair for any given key. (i.e. a store is a mapping from keys to values). It is also assumed that keys are case sensitive, i.e., the keys “foo” and “FOO” are different. The store interface also defines some operations involving prefixes. In the context of this interface, a prefix is a string containing only characters that are valid for use in keys and ending with a trailing / character.

type t
val size : t -> key -> int Deferred.t
val get : t -> key -> value Deferred.t
val get_partial_values : t -> string -> range list -> value list Deferred.t
val set : t -> key -> value -> unit Deferred.t
val set_partial_values : + t -> + key -> + ?append:bool -> + (range_start * value) list -> + unit Deferred.t
val erase : t -> key -> unit Deferred.t
val erase_prefix : t -> key -> unit Deferred.t
val list : t -> key list Deferred.t
val list_prefix : t -> key -> key list Deferred.t
val list_dir : t -> key -> (key list * prefix list) Deferred.t
val is_member : t -> key -> bool Deferred.t
diff --git a/zarr/Zarr/Util/ArrayMap/index.html b/zarr/Zarr/Util/ArrayMap/index.html new file mode 100644 index 00000000..5d451a3b --- /dev/null +++ b/zarr/Zarr/Util/ArrayMap/index.html @@ -0,0 +1,6 @@ + +ArrayMap (zarr.Zarr.Util.ArrayMap)

Module Util.ArrayMap

A finite map over integer array keys.

include Stdlib.Map.S with type key = int array
type key = int array
type !+'a t
val empty : 'a t
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : + (key -> 'a option -> 'b option -> 'c option) -> + 'a t -> + 'b t -> + 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val split : key -> 'a t -> 'a t * 'a option * 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val to_list : 'a t -> (key * 'a) list
val of_list : (key * 'a) list -> 'a t
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
val add_to_list : int array -> 'a -> 'a list t -> 'a list t

add_to_list k v map is map with k mapped to l such that l is v :: ArrayMap.find k map if k was bound in map and v otherwise.

diff --git a/zarr/Zarr/Util/ExtPoint/index.html b/zarr/Zarr/Util/ExtPoint/index.html new file mode 100644 index 00000000..2db9905d --- /dev/null +++ b/zarr/Zarr/Util/ExtPoint/index.html @@ -0,0 +1,2 @@ + +ExtPoint (zarr.Zarr.Util.ExtPoint)

Module Util.ExtPoint

The type representing a JSON extension point metadata configuration.

type 'a t = {
  1. name : string;
  2. configuration : 'a;
}
val (=) : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
diff --git a/zarr/Zarr/Util/Indexing/index.html b/zarr/Zarr/Util/Indexing/index.html new file mode 100644 index 00000000..a6a18357 --- /dev/null +++ b/zarr/Zarr/Util/Indexing/index.html @@ -0,0 +1,2 @@ + +Indexing (zarr.Zarr.Util.Indexing)

Module Util.Indexing

A module housing functions for creating and manipulating indices and slices for working with Zarr arrays.

val slice_of_coords : int array list -> Owl_types.index array

slice_of_coords c takes a list of array coordinates and returns a slice corresponding to the coordinates.

val coords_of_slice : Owl_types.index array -> int array -> int array array

coords_of_slice s shp returns an array of coordinates given a slice s and array shape shp.

val cartesian_prod : 'a list list -> 'a list list

cartesian_prod ll returns a cartesian product of the elements of list ll. It is mainly used to generate a C-order of chunk indices in a regular Zarr array grid.

val slice_shape : Owl_types.index array -> int array -> int array

slice_shape s shp returns the shape of slice s within an array of shape shp.

diff --git a/zarr/Zarr/Util/Result_syntax/index.html b/zarr/Zarr/Util/Result_syntax/index.html new file mode 100644 index 00000000..84845f88 --- /dev/null +++ b/zarr/Zarr/Util/Result_syntax/index.html @@ -0,0 +1,5 @@ + +Result_syntax (zarr.Zarr.Util.Result_syntax)

Module Util.Result_syntax

Result monad operator syntax.

val (>>=) : + ('a, 'e) Stdlib.result -> + ('a -> ('b, 'e) Stdlib.result) -> + ('b, 'e) Stdlib.result
val (>>|) : ('a, 'e) Stdlib.result -> ('a -> 'b) -> ('b, 'e) Stdlib.result
diff --git a/zarr/Zarr/Util/index.html b/zarr/Zarr/Util/index.html new file mode 100644 index 00000000..1312903d --- /dev/null +++ b/zarr/Zarr/Util/index.html @@ -0,0 +1,2 @@ + +Util (zarr.Zarr.Util)

Module Zarr.Util

module ExtPoint : sig ... end

The type representing a JSON extension point metadata configuration.

module ArrayMap : sig ... end

A finite map over integer array keys.

module Result_syntax : sig ... end

Result monad operator syntax.

module Indexing : sig ... end

A module housing functions for creating and manipulating indices and slices for working with Zarr arrays.

val get_name : Yojson.Safe.t -> string

get_name c returns the name value of a JSON metadata extension point configuration of the form {"name": value, "configuration": ...}, as defined in the Zarr V3 specification.

val prod : int array -> int

prod x returns the product of the elements of x.

val max : int array -> int

max x returns the maximum element of an integer array x.

val create_parent_dir : string -> Unix.file_perm -> unit

create_parent_dir f p creates all the parent directories of file name f if they don't exist given file permissions p.

diff --git a/zarr/Zarr/index.html b/zarr/Zarr/index.html index 851df3c1..71bd3f07 100644 --- a/zarr/Zarr/index.html +++ b/zarr/Zarr/index.html @@ -1,47 +1,21 @@ -Zarr (zarr.Zarr)

Module Zarr

zarr Provides an Ocaml implementation of the Zarr version 3 storage format specification. It supports creation of arrays and groups as well as chunking arrays along any dimension. One can store a Zarr hierarchy in memory or on disk. Zarr also supports reading zarr hierarchies created using other implementations, as long as they are spec-compliant.

Consult the examples and limitations for more info.

References

Node

module Node : sig ... end

This module provides functionality for manipulating Zarr nodes.

Metadata

module ArrayMetadata : sig ... end

A module which contains functionality to work with a parsed JSON Zarr array metadata document.

module GroupMetadata : sig ... end

A module which contains functionality to work with a parsed JSON Zarr group metadata document.

Storage

module Storage : sig ... end

Codecs

module Codecs : sig ... end

An array has an associated list of codecs. Each codec specifies a bidirectional transform (an encode transform and a decode transform). This module contains building blocks for creating and working with a chain of codecs.

Indexing

module Indexing : sig ... end

A module housing functions for creating and manipulating indices and slices for working with Zarr arrays.

Examples

Create, read & write array.

open Zarr
+Zarr (zarr.Zarr)

Module Zarr

zarr Provides an Ocaml implementation of the Zarr version 3 storage format specification. It supports creation of arrays and groups as well as chunking arrays along any dimension. One can store a Zarr hierarchy in memory or on disk. Zarr also supports reading zarr hierarchies created using other implementations, as long as they are spec-compliant.

Consult the examples and limitations for more info.

References

Node

module Node : sig ... end

This module provides functionality for manipulating Zarr nodes.

Metadata

module Metadata : sig ... end

This module provides functionality for manipulating a Zarr node's metadata JSON document.

Storage

module Storage : sig ... end
module Memory : sig ... end
module Types : sig ... end

Codecs

module Codecs : sig ... end

An array has an associated list of codecs. Each codec specifies a bidirectional transform (an encode transform and a decode transform). This module contains building blocks for creating and working with a chain of codecs.

Indexing

module Indexing = Util.Indexing

Utils

module Util : sig ... end

Examples

Create, read & write array.

Here we show how the library's asynchronous API using Lwt's concurrency monad can be used.

open Zarr.Metadata
 open Zarr.Node
 open Zarr.Codecs
-open Zarr.Storage
+open Zarr_lwt.Storage
+open FilesystemStore.Deferred.Infix
 
-let store =
-  Result.get_ok @@ FilesystemStore.open_or_create "testdata.zarr" in
-let group_node = Result.get_ok @@ GroupNode.of_path "/some/group" in
-FilesystemStore.create_group store group_node;
-let array_node = Result.get_ok @@ ArrayNode.(group_node / "name") in
-FilesystemStore.create_array
-  ~codecs:[`Transpose [|2; 0; 1|]; `Bytes BE; `Gzip L2]
-  ~shape:[|100; 100; 50|]
-  ~chunks:[|10; 15; 20|]
-  Bigarray.Float32 
-  Float.neg_infinity
-  array_node
-  store;
-let slice = Owl_types.[|R [0; 20]; I 10; R []|] in
-let x =
-  Result.get_ok @@
-  FilesystemStore.get_array store array_node slice Bigarray.Float32 in
-let x' =
-  Owl.Dense.Ndarray.Generic.map
-    (fun _ -> Owl_stats_dist.uniform_rvs 0. 10.) x in
-FilesystemStore.set_array store array_node slice x';

Using sharding codec.

let config =
-  {chunk_shape = [|5; 3; 5|]
-  ;codecs = [`Transpose [|2; 0; 1|]; `Bytes LE; `Gzip L5]
-  ;index_codecs = [`Bytes BE; `Crc32c]
-  ;index_location = Start} in
-let shard_node = Result.get_ok @@ ArrayNode.(group_node / "another") in
-FilesystemStore.create_array
-  ~codecs:[`ShardingIndexed config]
-  ~shape:[|100; 100; 50|]
-  ~chunks:[|10; 15; 20|]
-  Bigarray.Complex32
-  Complex.zero
-  shard_node
-  store;

Explore a Zarr hierarchy.

Functions to query a zarr hierarchy are provided. These include listing all nodes, finding children of a group node, resizing an array, deleting nodes, obtaining metadata of a node, and more.

let a, g = FilesystemStore.find_all_nodes store in
-FilesystemStore.reshape store array_node [|25; 32; 10|];
-let meta =
-  Result.get_ok @@ FilesystemStore.group_metadata store group_node in
-GroupMetadata.show meta;
-FilesystemStore.array_exists store shard_node;
-let a, g = FilesystemStore.find_child_nodes store group_node in
-FilesystemStore.erase_group_node store group_node;

Extension Points

This library also provides custom extensions not defined in the version 3 specification. These are tabulated below:

Extension Point

Details

Data Types

char, complex32, int (63-bit integer), nativeint

Limitations

Although this implementation tries to be spec compliant, it does come with a few limitations:

  • Ocaml does not have support for unsigned integers as array data types and thus this library cannot support reading values of datatypes uint32, uint64 and complex128.
+let main () = + let store = FilesystemStore.create "testdata.zarr" in + let group_node = GroupNode.of_path "/some/group" in + FilesystemStore.create_group store group_node >>= fun () -> + let array_node = ArrayNode.(group_node / "name") in + FilesystemStore.create_array + ~codecs:[`Bytes BE] ~shape:[|100; 100; 50|] ~chunks:[|10; 15; 20|] + Bigarray.Float32 Float.neg_infinity array_node store; >>= fun () -> + let slice = Owl_types.[|R [0; 20]; I 10; R []|] in + FilesystemStore.get_array store array_node slice Bigarray.Float32 >>= fun arr -> + let x' = Owl.Dense.Ndarray.Generic.map (fun _ -> Owl_stats_dist.uniform_rvs 0. 10.) x in + FilesystemStore.set_array store array_node slice x' + +let _ = Lwt_main.run @@ main ()

Extension Points

This library also provides custom extensions not defined in the version 3 specification. These are tabulated below:

Extension Point

Details

Data Types

char, complex32, int (63-bit integer), nativeint

Limitations

Although this implementation tries to be spec compliant, it does come with a few limitations: