Module Owl_utils

Helper functions used in the library

include module type of struct include Owl_utils_ndarray end
val elt_to_str : 'a 'b. ('a, 'b) Stdlib.Bigarray.kind -> 'a -> string
val elt_of_str : 'a 'b. ('a, 'b) Stdlib.Bigarray.kind -> string -> 'a
val numel : ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t -> int
val calc_stride : int array -> int array
val calc_slice : int array -> int array
val index_1d_nd : int -> int array -> int array -> unit
val index_nd_1d : int array -> int array -> int
val ind : ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t -> int -> int array
val i1d : ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t -> int array -> int
val adjust_index : int -> int -> int
val reduce_params : int -> ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t -> int * int * int * int array
val broadcastable : int array -> int array -> bool
module Stack = Owl_utils_stack
module Heap = Owl_utils_heap
module Array = Owl_utils_array
val range_fold : int -> int -> f:('a -> int -> 'b) -> init:'c -> 'd
val array_reverse : 'a array -> unit
val array_insert : 'a array -> int -> 'b -> 'c array
val get_suffix : string -> string
val count_dup : 'a list -> ('b * int) list
val array2_to_array1 : ('a, 'b, 'c) Stdlib.Bigarray.Array2.t -> ('d, 'e, 'f) Stdlib.Bigarray.Array1.t
val aarr_iter : ('a -> unit) -> 'a array array -> unit
val aarr_iteri : (int -> int -> 'a -> unit) -> 'b array array -> unit
val aarr_map : ('a -> 'b) -> 'a array array -> 'b array array
val aarr_mapi : (int -> int -> 'a -> 'b) -> 'c array array -> 'd array array
val aarr_map2 : ('a -> 'b -> 'c) -> 'a array array -> 'b array array -> 'c array array
val aarr_map2i : (int -> int -> 'a -> 'b -> 'c) -> 'd array array -> 'e array array -> 'f array array
val aarr_map3i : (int -> int -> 'a -> 'b -> 'c -> 'd) -> 'e array array -> 'f array array -> 'g array array -> 'h array array
val aarr_map3 : ('a -> 'b -> 'c -> 'd) -> 'e array array -> 'f array array -> 'g array array -> 'h array array
val aarr_map4 : ('a -> 'b -> 'c -> 'd -> 'e) -> 'f array array -> 'g array array -> 'h array array -> 'i array array -> 'j array array
val aarr2llss : 'a array array -> 'a list list
val llss2aarr : 'a list list -> 'a array array
val aarr_fold : ('a -> 'b -> 'c) -> 'd -> 'e array array -> 'f
val aarr_matrix : int -> int -> 'a -> 'b array array
val array1_extend : ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t -> int -> ('c, 'd, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
val array1_copy : ('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t -> ('c, 'd, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t
val aaarrr_map : ('a -> 'b) -> 'a array array array -> 'b array array array
val squeeze_continuous_dims : int array -> int array -> int array
val format_time : float -> string
val time : (unit -> unit) -> float

measure the time spent in a function in millisecond

val eps : 'a 'b. ('a, 'b) Stdlib.Bigarray.kind -> float

TODO: return the the distance between 1.0 and the next larger representable floating-point value.

val num_typ_to_str : Owl_types.number -> string
val num_typ_of_str : string -> Owl_types.number
val longest_string : string array -> int
val pad_strings : [< `Left | `Right ] -> int -> string array -> string array