package bimage

  1. Overview
  2. Docs

Source file input.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
type t = Image.any array
type index = int

let empty = [||]
let append a image = Array.append a [| Image.any image |]
let or_default = function Some x -> x | None -> 0

let get inputs i =
  if i < Array.length inputs then inputs.(i) else Error.exc (`Invalid_input i)

let shape inputs =
  let (Image.Any a) = get inputs 0 in
  Image.shape a

let of_image image = [| Image.any image |]
OCaml

Innovation. Community. Security.