Module Ptree.DictSource

Sourcetype fields = (string * t) list
Sourceval fields_exn : ?ctx:string -> t -> fields

Extract dict fields or fail with a helpful ctx-prefixed message.

Sourceval find : string -> fields -> t option
Sourceval find_exn : ?ctx:string -> string -> fields -> t
Sourceval set : string -> t -> fields -> fields
Sourceval update : (t -> t) -> string -> fields -> fields
Sourceval mem : string -> fields -> bool
Sourceval get_tensor : fields -> name:string -> ('a, 'l) Nx_core.Dtype.t -> ('a, 'l) Rune.t option
Sourceval get_tensor_exn : fields -> name:string -> ('a, 'l) Nx_core.Dtype.t -> ('a, 'l) Rune.t