diff --git a/src/base/core/owl_const.ml b/src/base/core/owl_const.ml index ba2b690a8..efc05e56a 100644 --- a/src/base/core/owl_const.ml +++ b/src/base/core/owl_const.ml @@ -76,7 +76,7 @@ let one : type a b. (a, b) kind -> a = function | Int -> 1 | Nativeint -> 1n | Char -> '\001' - | Float16 -> failwith "not implemented" + | _ -> failwith "not implemented" let neg_one : type a b. (a, b) kind -> a = function @@ -93,7 +93,7 @@ let neg_one : type a b. (a, b) kind -> a = function | Int -> -1 | Nativeint -> -1n | Char -> '\255' - | Float16 -> failwith "not implemented" + | _ -> failwith "not implemented" let pos_inf : type a b. (a, b) kind -> a = function diff --git a/src/base/misc/owl_utils_ndarray.ml b/src/base/misc/owl_utils_ndarray.ml index f6366bb5e..baee4b8ca 100644 --- a/src/base/misc/owl_utils_ndarray.ml +++ b/src/base/misc/owl_utils_ndarray.ml @@ -16,12 +16,11 @@ let elt_to_str : type a b. (a, b) kind -> a -> string = function | Int -> fun v -> Printf.sprintf "%i" v | Int32 -> fun v -> Printf.sprintf "%ld" v | Int64 -> fun v -> Printf.sprintf "%Ld" v - | Float16 -> fun v -> Printf.sprintf "%G" v | Float32 -> fun v -> Printf.sprintf "%G" v | Float64 -> fun v -> Printf.sprintf "%G" v | Complex32 -> fun v -> Printf.sprintf "(%G, %Gi)" Complex.(v.re) Complex.(v.im) | Complex64 -> fun v -> Printf.sprintf "(%G, %Gi)" Complex.(v.re) Complex.(v.im) - + | _ -> failwith "not implemented" (* convert an element of string to elt type *) let elt_of_str : type a b. (a, b) kind -> string -> a = function @@ -34,13 +33,13 @@ let elt_of_str : type a b. (a, b) kind -> string -> a = function | Int -> fun v -> int_of_string v | Int32 -> fun v -> Int32.of_string v | Int64 -> fun v -> Int64.of_string v - | Float16 -> fun v -> float_of_string v | Float32 -> fun v -> float_of_string v | Float64 -> fun v -> float_of_string v | Complex32 -> fun v -> Scanf.sscanf v "(%f, %fi)%!" (fun re im -> { Complex.re; im }) | Complex64 -> fun v -> Scanf.sscanf v "(%f, %fi)%!" (fun re im -> { Complex.re; im }) + | _ -> failwith "not implemented" (* calculate the number of elements in an ndarray *)