Base.Dense.Ndarray.Generic

This document is auto-generated for Owl’s APIs. #185 entries have been extracted. timestamp: 2018-04-16 13:12:54

Github: {Signature} {Implementation}

Type definition

type ('a, 'b) t = ('a, 'b, c_layout) Genarray.t

Refer to Dense.Ndarray.Generic

type ('a, 'b) kind = ('a, 'b) Bigarray.kind

Refer to Dense.Ndarray.Generic

Create Ndarrays

val empty : ('a, 'b) kind -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val create : ('a, 'b) kind -> int array -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val init : ('a, 'b) kind -> int array -> (int -> 'a) -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val zeros : ('a, 'b) kind -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val ones : ('a, 'b) kind -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val uniform : (float, 'b) kind -> ?a:float -> ?b:float -> int array -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val gaussian : (float, 'b) kind -> ?mu:float -> ?sigma:float -> int array -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sequential : (float, 'b) kind -> ?a:float -> ?step:float -> int array -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val bernoulli : (float, 'b) kind -> ?p:float -> int array -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

Obtain basic properties

val shape : ('a, 'b) t -> int array

Refer to Dense.Ndarray.Generic

source code

val num_dims : ('a, 'b) t -> int

Refer to Dense.Ndarray.Generic

val numel : ('a, 'b) t -> int

Refer to Dense.Ndarray.Generic

source code

val kind : ('a, 'b) t -> ('a, 'b) kind

Refer to Dense.Ndarray.Generic

source code

val strides : ('a, 'b) t -> int array

Refer to Dense.Ndarray.Generic

source code

val slice_size : ('a, 'b) t -> int array

Refer to Dense.Ndarray.Generic

source code

Manipulate Ndarrays

val get : ('a, 'b) t -> int array -> 'a

Refer to Dense.Ndarray.Generic

source code

val set : ('a, 'b) t -> int array -> 'a -> unit

Refer to Dense.Ndarray.Generic

source code

val get_slice : int list list -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val set_slice : int list list -> ('a, 'b) t -> ('a, 'b) t -> unit

Refer to Dense.Ndarray.Generic

source code

val reset : (float, 'b) t -> unit

Refer to Dense.Ndarray.Generic

source code

val copy : ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val reshape : ('a, 'b) t -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val flatten : ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val reverse : ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val transpose : ?axis:int array -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val tile : ('a, 'b) t -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val repeat : ?axis:int -> ('a, 'b) t -> int -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val concatenate : ?axis:int -> ('a, 'b) t array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val split : ?axis:int -> int array -> ('a, 'b) t -> ('a, 'b) t array

Refer to Dense.Ndarray.Generic

source code

val draw : ?axis:int -> ('a, 'b) t -> int -> ('a, 'b) t * int array

Refer to Dense.Ndarray.Generic

source code

Iterate array elements

val iteri : (int -> 'a -> unit) -> ('a, 'b) t -> unit

Refer to Dense.Ndarray.Generic

source code

val iter : ('a -> unit) -> ('a, 'b) t -> unit

Refer to Dense.Ndarray.Generic

source code

val mapi : (int -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val map : ('a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val filteri : (int -> 'a -> bool) -> ('a, 'b) t -> int array

Refer to Dense.Ndarray.Generic

source code

val filter : ('a -> bool) -> ('a, 'b) t -> int array

Refer to Dense.Ndarray.Generic

source code

val foldi : ?axis:int -> (int -> 'a -> 'a -> 'a) -> 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val fold : ?axis:int -> ('a -> 'a -> 'a) -> 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scani : ?axis:int -> (int -> 'a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scan : ?axis:int -> ('a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

Examination & Comparison

val exists : ('a -> bool) -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val not_exists : ('a -> bool) -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val for_all : ('a -> bool) -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_zero : ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_positive : ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_negative : ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_nonpositive : ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_nonnegative : ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val is_normal : (float, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val not_nan : (float, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val not_inf : (float, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val equal : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val not_equal : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val greater : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val less : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val greater_equal : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val less_equal : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val elt_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_not_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_less : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_greater : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_less_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_greater_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val equal_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val not_equal_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val less_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val greater_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val less_equal_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val greater_equal_scalar : ('a, 'b) t -> 'a -> bool

Refer to Dense.Ndarray.Generic

source code

val elt_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_not_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_less_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_greater_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_less_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val elt_greater_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val approx_equal : ?eps:float -> (float, 'b) t -> (float, 'b) t -> bool

Refer to Dense.Ndarray.Generic

source code

val approx_equal_scalar : ?eps:float -> (float, 'b) t -> float -> bool

Refer to Dense.Ndarray.Generic

source code

val approx_elt_equal : ?eps:float -> (float, 'b) t -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val approx_elt_equal_scalar : ?eps:float -> (float, 'b) t -> float -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

Input/Output functions

val of_array : ('a, 'b) kind -> 'a array -> int array -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val print : ?max_row:int -> ?max_col:int -> ?header:bool -> ?fmt:('a -> string) -> ('a, 'b) t -> unit

Refer to Dense.Ndarray.Generic

source code

val load : ('a, 'b) kind -> string -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

Unary math operators

val sum : ?axis:int -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

val sum' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

val min' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

val max' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

val abs : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val neg : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val signum : (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val sqr : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sqrt : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val exp : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val log : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val log10 : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val log2 : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sin : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val cos : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val tan : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

val asin : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val acos : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val atan : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sinh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val cosh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val tanh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val asinh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val acosh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val atanh : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val floor : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val ceil : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val round : (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val relu : (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val sigmoid : (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val l1norm' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

val l2norm' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

val l2norm_sqr' : (float, 'b) t -> float

Refer to Dense.Ndarray.Generic

source code

Binary math operators

val add : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sub : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val mul : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val div : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val add_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val sub_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val mul_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val div_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scalar_add : 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scalar_sub : 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scalar_mul : 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scalar_div : 'a -> ('a, 'b) t -> ('a, 'b) t

Refer to Dense.Ndarray.Generic

source code

val pow : (float, 'b) t -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val scalar_pow : float -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val pow_scalar : (float, 'b) t -> float -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val atan2 : (float, 'a) t -> (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val scalar_atan2 : float -> (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val atan2_scalar : (float, 'a) t -> float -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

val clip_by_value : ?amin:float -> ?amax:float -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

val clip_by_l2norm : float -> (float, 'a) t -> (float, 'a) t

Refer to Dense.Ndarray.Generic

source code

Helper functions

val sum_slices : ?axis:int -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Ndarray.Generic

source code

Matrix functions

val row_num : ('a, 'b) t -> int

Refer to Dense.Matrix.Generic

source code

val col_num : ('a, 'b) t -> int

Refer to Dense.Matrix.Generic

source code

val row : ('a, 'b) t -> int -> ('a, 'b) t

Refer to Dense.Matrix.Generic

source code

val rows : ('a, 'b) t -> int array -> ('a, 'b) t

Refer to Dense.Matrix.Generic

source code

val copy_row_to : ('a, 'b) t -> ('a, 'b) t -> int -> unit

Refer to Dense.Matrix.Generic

source code

val copy_col_to : ('a, 'b) t -> ('a, 'b) t -> int -> unit

Refer to Dense.Matrix.Generic

source code

val dot : (float, 'b) t -> (float, 'b) t -> (float, 'b) t

Refer to Dense.Matrix.Generic

source code

val inv : (float, 'b) t -> (float, 'b) t

Refer to Dense.Matrix.Generic

source code

val trace : (float, 'b) t -> float

Refer to Dense.Matrix.Generic

source code

val to_rows : ('a, 'b) t -> ('a, 'b) t array

Refer to Dense.Matrix.Generic

source code

val of_rows : ('a, 'b) t array -> ('a, 'b) t

Refer to Dense.Matrix.Generic

source code

val of_arrays : ('a, 'b) kind -> 'a array array -> ('a, 'b) t

Refer to Dense.Matrix.Generic

source code

val draw_rows : ?replacement:bool -> ('a, 'b) t -> int -> ('a, 'b) t * int array

Refer to Dense.Matrix.Generic

source code

val draw_rows2 : ?replacement:bool -> ('a, 'b) t -> ('a, 'b) t -> int -> ('a, 'b) t * ('a, 'b) t * int array

Refer to Dense.Matrix.Generic

source code