From 91b7a69a766b364bac37e9e48fade169e5e2ce8b Mon Sep 17 00:00:00 2001 From: zoj613 Date: Thu, 4 Jul 2024 11:47:54 +0000 Subject: [PATCH] deploy: 08761f8b9a556dab96a5995c3dfae6bdae1a93f6 --- 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 | 28 ++++++++++--------- zarr/Zarr/Storage/Make/index.html | 28 ++++++++++--------- zarr/Zarr/Storage/MemoryStore/index.html | 28 ++++++++++--------- .../Zarr/Storage/module-type-MAKER/index.html | 28 ++++++++++--------- zarr/Zarr/Storage/module-type-S/index.html | 28 ++++++++++--------- 8 files changed, 80 insertions(+), 66 deletions(-) create mode 100644 zarr/Zarr/Node/ArrayNode/index.html create mode 100644 zarr/Zarr/Node/GroupNode/index.html diff --git a/zarr/Zarr/Node/ArrayNode/index.html b/zarr/Zarr/Node/ArrayNode/index.html new file mode 100644 index 00000000..afb79d3e --- /dev/null +++ b/zarr/Zarr/Node/ArrayNode/index.html @@ -0,0 +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.

diff --git a/zarr/Zarr/Node/GroupNode/index.html b/zarr/Zarr/Node/GroupNode/index.html new file mode 100644 index 00000000..ea156477 --- /dev/null +++ b/zarr/Zarr/Node/GroupNode/index.html @@ -0,0 +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.

diff --git a/zarr/Zarr/Node/index.html b/zarr/Zarr/Node/index.html index 30c9909c..3557200e 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 t

The type of a node.

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

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

val root : t

Returns the root node

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

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

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

The infix operator alias of Node.create

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

of_path s returns a node from string s or an error of type 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_parent : t -> t -> bool

is_parent m n Tests if node n is a the immediate parent of node m. 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.

+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
diff --git a/zarr/Zarr/Storage/FilesystemStore/index.html b/zarr/Zarr/Storage/FilesystemStore/index.html index 9ab705c3..c7645dac 100644 --- a/zarr/Zarr/Storage/FilesystemStore/index.html +++ b/zarr/Zarr/Storage/FilesystemStore/index.html @@ -2,8 +2,8 @@ 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 : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> - Node.t -> - unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : + Node.GroupNode.t -> + unit

create_group ~meta t node creates a group node in store t containing metadata meta. 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 -> @@ -12,35 +12,37 @@ chunks:int array -> ('a, 'b) Stdlib.Bigarray.kind -> 'a -> - Node.t -> + Node.ArrayNode.t -> t -> (unit, [> Codecs.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 : - Node.t -> + Node.ArrayNode.t -> 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:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : - Node.t -> + 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 : + Node.GroupNode.t -> 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:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : + 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.t -> - (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

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

val is_member : t -> Node.t -> bool

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

val set_array : - Node.t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list, + [> Zarr__.Storage_intf.error ]) + Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. This operation can fail if n 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 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 -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t 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 : - Node.t -> + Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) Stdlib.result

get_array n s k t 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.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:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
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 : + (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 : diff --git a/zarr/Zarr/Storage/Make/index.html b/zarr/Zarr/Storage/Make/index.html index c4bd6c1b..2ec86f4d 100644 --- a/zarr/Zarr/Storage/Make/index.html +++ b/zarr/Zarr/Storage/Make/index.html @@ -2,8 +2,8 @@ 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 : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> - Node.t -> - unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : + Node.GroupNode.t -> + unit

create_group ~meta t node creates a group node in store t containing metadata meta. 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 -> @@ -12,32 +12,34 @@ chunks:int array -> ('a, 'b) Stdlib.Bigarray.kind -> 'a -> - Node.t -> + Node.ArrayNode.t -> t -> (unit, [> Codecs.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 : - Node.t -> + Node.ArrayNode.t -> 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:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : - Node.t -> + 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 : + Node.GroupNode.t -> 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:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : + 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.t -> - (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

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

val is_member : t -> Node.t -> bool

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

val set_array : - Node.t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list, + [> Zarr__.Storage_intf.error ]) + Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. This operation can fail if n 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 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 -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t 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 : - Node.t -> + Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) Stdlib.result

get_array n s k t 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.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:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
+ (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/MemoryStore/index.html b/zarr/Zarr/Storage/MemoryStore/index.html index af5d529b..dfb65290 100644 --- a/zarr/Zarr/Storage/MemoryStore/index.html +++ b/zarr/Zarr/Storage/MemoryStore/index.html @@ -2,8 +2,8 @@ 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 : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> - Node.t -> - unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : + Node.GroupNode.t -> + unit

create_group ~meta t node creates a group node in store t containing metadata meta. 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 -> @@ -12,32 +12,34 @@ chunks:int array -> ('a, 'b) Stdlib.Bigarray.kind -> 'a -> - Node.t -> + Node.ArrayNode.t -> t -> (unit, [> Codecs.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 : - Node.t -> + Node.ArrayNode.t -> 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:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : - Node.t -> + 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 : + Node.GroupNode.t -> 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:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : + 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.t -> - (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

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

val is_member : t -> Node.t -> bool

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

val set_array : - Node.t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list, + [> Zarr__.Storage_intf.error ]) + Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. This operation can fail if n 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 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 -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t 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 : - Node.t -> + Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) Stdlib.result

get_array n s k t 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.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:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
val create : unit -> t

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

+ (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/module-type-MAKER/index.html b/zarr/Zarr/Storage/module-type-MAKER/index.html index 1c08c9cd..0bae74d0 100644 --- a/zarr/Zarr/Storage/module-type-MAKER/index.html +++ b/zarr/Zarr/Storage/module-type-MAKER/index.html @@ -2,8 +2,8 @@ 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 : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> - Node.t -> - unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : + Node.GroupNode.t -> + unit

create_group ~meta t node creates a group node in store t containing metadata meta. 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 -> @@ -12,32 +12,34 @@ chunks:int array -> ('a, 'b) Stdlib.Bigarray.kind -> 'a -> - Node.t -> + Node.ArrayNode.t -> t -> (unit, [> Codecs.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 : - Node.t -> + Node.ArrayNode.t -> 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:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : - Node.t -> + 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 : + Node.GroupNode.t -> 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:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : + 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.t -> - (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

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

val is_member : t -> Node.t -> bool

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

val set_array : - Node.t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list, + [> Zarr__.Storage_intf.error ]) + Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. This operation can fail if n 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 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 -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t 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 : - Node.t -> + Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) Stdlib.result

get_array n s k t 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.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:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
+ (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 index 2814725d..fe98f0dc 100644 --- a/zarr/Zarr/Storage/module-type-S/index.html +++ b/zarr/Zarr/Storage/module-type-S/index.html @@ -2,8 +2,8 @@ S (zarr.Zarr.Storage.S)

Module type Storage.S

The public interface of all supported stores.

type t

The storage type.

val create_group : ?metadata:Zarr__.Metadata.GroupMetadata.t -> t -> - Node.t -> - unit

create_group ~meta t node creates a group node in store t containing metadata meta. This is a no-op if a node node is already a member of this store.

val create_array : + Node.GroupNode.t -> + unit

create_group ~meta t node creates a group node in store t containing metadata meta. 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 -> @@ -12,32 +12,34 @@ chunks:int array -> ('a, 'b) Stdlib.Bigarray.kind -> 'a -> - Node.t -> + Node.ArrayNode.t -> t -> (unit, [> Codecs.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 : - Node.t -> + Node.ArrayNode.t -> 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:

  • The node is not a member of store t.
  • if node node is a group node.
val group_metadata : - Node.t -> + 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 : + Node.GroupNode.t -> 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:

  • The node is not a member of store t.
  • if node node is an array node.
val find_child_nodes : + 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.t -> - (Node.t list * Node.t list, [> Zarr__.Storage_intf.error ]) Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. The first element of the tuple is a list of array child nodes, and the second element a list of child group nodes. This operation can fail if:

  • Node n is not a member of store t.
  • Node n is an array node of store t.
val find_all_nodes : t -> Node.t list

find_all_nodes t returns a list of all nodes in store t. If the store has no nodes, an empty list is returned.

val erase_node : t -> Node.t -> unit

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

val is_member : t -> Node.t -> bool

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

val set_array : - Node.t -> + Node.GroupNode.t -> + (Node.ArrayNode.t list * Node.GroupNode.t list, + [> Zarr__.Storage_intf.error ]) + Stdlib.result

find_child_nodes t n returns a tuple of child nodes of group node n. This operation can fail if n 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 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 -> Owl_types.index array -> ('a, 'b) Zarr__.Storage_intf.Ndarray.t -> t -> (unit, [> Zarr__.Storage_intf.error ]) Stdlib.result

set_array n s x t 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 : - Node.t -> + Node.ArrayNode.t -> Owl_types.index array -> ('a, 'b) Stdlib.Bigarray.kind -> t -> (('a, 'b) Zarr__.Storage_intf.Ndarray.t, [> Zarr__.Storage_intf.error ]) Stdlib.result

get_array n s k t 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.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:

  • Node n is not a valid array node.
  • If shape does not have the same dimensions as node n's shape.
+ (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.