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
val create : ('a, 'b) kind -> int array -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val init : ('a, 'b) kind -> int array -> (int -> 'a) -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val zeros : ('a, 'b) kind -> int array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val ones : ('a, 'b) kind -> int array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val uniform : (float, 'b) kind -> ?a:float -> ?b:float -> int array -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val gaussian : (float, 'b) kind -> ?mu:float -> ?sigma:float -> int array -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val sequential : (float, 'b) kind -> ?a:float -> ?step:float -> int array -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val bernoulli : (float, 'b) kind -> ?p:float -> int array -> (float, 'b) t
Refer to Dense.Ndarray.Generic
Obtain basic properties¶
val shape : ('a, 'b) t -> int array
Refer to Dense.Ndarray.Generic
val num_dims : ('a, 'b) t -> int
Refer to Dense.Ndarray.Generic
val numel : ('a, 'b) t -> int
Refer to Dense.Ndarray.Generic
val kind : ('a, 'b) t -> ('a, 'b) kind
Refer to Dense.Ndarray.Generic
val strides : ('a, 'b) t -> int array
Refer to Dense.Ndarray.Generic
val slice_size : ('a, 'b) t -> int array
Refer to Dense.Ndarray.Generic
Manipulate Ndarrays¶
val get : ('a, 'b) t -> int array -> 'a
Refer to Dense.Ndarray.Generic
val set : ('a, 'b) t -> int array -> 'a -> unit
Refer to Dense.Ndarray.Generic
val get_slice : int list list -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val set_slice : int list list -> ('a, 'b) t -> ('a, 'b) t -> unit
Refer to Dense.Ndarray.Generic
val reset : (float, 'b) t -> unit
Refer to Dense.Ndarray.Generic
val copy : ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val reshape : ('a, 'b) t -> int array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val flatten : ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val reverse : ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val transpose : ?axis:int array -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val tile : ('a, 'b) t -> int array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val repeat : ?axis:int -> ('a, 'b) t -> int -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val concatenate : ?axis:int -> ('a, 'b) t array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val split : ?axis:int -> int array -> ('a, 'b) t -> ('a, 'b) t array
Refer to Dense.Ndarray.Generic
val draw : ?axis:int -> ('a, 'b) t -> int -> ('a, 'b) t * int array
Refer to Dense.Ndarray.Generic
Iterate array elements¶
val iteri : (int -> 'a -> unit) -> ('a, 'b) t -> unit
Refer to Dense.Ndarray.Generic
val iter : ('a -> unit) -> ('a, 'b) t -> unit
Refer to Dense.Ndarray.Generic
val mapi : (int -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val map : ('a -> 'a) -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val filteri : (int -> 'a -> bool) -> ('a, 'b) t -> int array
Refer to Dense.Ndarray.Generic
val filter : ('a -> bool) -> ('a, 'b) t -> int array
Refer to Dense.Ndarray.Generic
val foldi : ?axis:int -> (int -> 'a -> 'a -> 'a) -> 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val fold : ?axis:int -> ('a -> 'a -> 'a) -> 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scani : ?axis:int -> (int -> 'a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scan : ?axis:int -> ('a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
Examination & Comparison¶
val exists : ('a -> bool) -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val not_exists : ('a -> bool) -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val for_all : ('a -> bool) -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_zero : ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_positive : ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_negative : ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_nonpositive : ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_nonnegative : ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val is_normal : (float, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val not_nan : (float, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val not_inf : (float, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val equal : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val not_equal : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val greater : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val less : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val greater_equal : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val less_equal : ('a, 'b) t -> ('a, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val elt_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_not_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_less : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_greater : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_less_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_greater_equal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val equal_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val not_equal_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val less_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val greater_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val less_equal_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val greater_equal_scalar : ('a, 'b) t -> 'a -> bool
Refer to Dense.Ndarray.Generic
val elt_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_not_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_less_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_greater_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_less_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val elt_greater_equal_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val approx_equal : ?eps:float -> (float, 'b) t -> (float, 'b) t -> bool
Refer to Dense.Ndarray.Generic
val approx_equal_scalar : ?eps:float -> (float, 'b) t -> float -> bool
Refer to Dense.Ndarray.Generic
val approx_elt_equal : ?eps:float -> (float, 'b) t -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val approx_elt_equal_scalar : ?eps:float -> (float, 'b) t -> float -> (float, 'b) t
Refer to Dense.Ndarray.Generic
Input/Output functions¶
val of_array : ('a, 'b) kind -> 'a array -> int array -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val print : ?max_row:int -> ?max_col:int -> ?header:bool -> ?fmt:('a -> string) -> ('a, 'b) t -> unit
Refer to Dense.Ndarray.Generic
val load : ('a, 'b) kind -> string -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
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
val min' : (float, 'b) t -> float
Refer to Dense.Ndarray.Generic
val max' : (float, 'b) t -> float
Refer to Dense.Ndarray.Generic
val abs : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val neg : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val signum : (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val sqr : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val sqrt : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val exp : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val log : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val log10 : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val log2 : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val sin : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val cos : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
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
val acos : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val atan : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val sinh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val cosh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val tanh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val asinh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val acosh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val atanh : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val floor : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val ceil : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val round : (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val relu : (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val sigmoid : (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val l1norm' : (float, 'b) t -> float
Refer to Dense.Ndarray.Generic
val l2norm' : (float, 'b) t -> float
Refer to Dense.Ndarray.Generic
val l2norm_sqr' : (float, 'b) t -> float
Refer to Dense.Ndarray.Generic
Binary math operators¶
val add : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val sub : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val mul : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val div : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val add_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val sub_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val mul_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val div_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scalar_add : 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scalar_sub : 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scalar_mul : 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val scalar_div : 'a -> ('a, 'b) t -> ('a, 'b) t
Refer to Dense.Ndarray.Generic
val pow : (float, 'b) t -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val scalar_pow : float -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val pow_scalar : (float, 'b) t -> float -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val atan2 : (float, 'a) t -> (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val scalar_atan2 : float -> (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val atan2_scalar : (float, 'a) t -> float -> (float, 'a) t
Refer to Dense.Ndarray.Generic
val clip_by_value : ?amin:float -> ?amax:float -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
val clip_by_l2norm : float -> (float, 'a) t -> (float, 'a) t
Refer to Dense.Ndarray.Generic
Helper functions¶
val sum_slices : ?axis:int -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Ndarray.Generic
Matrix functions¶
val row_num : ('a, 'b) t -> int
Refer to Dense.Matrix.Generic
val col_num : ('a, 'b) t -> int
Refer to Dense.Matrix.Generic
val row : ('a, 'b) t -> int -> ('a, 'b) t
Refer to Dense.Matrix.Generic
val rows : ('a, 'b) t -> int array -> ('a, 'b) t
Refer to Dense.Matrix.Generic
val copy_row_to : ('a, 'b) t -> ('a, 'b) t -> int -> unit
Refer to Dense.Matrix.Generic
val copy_col_to : ('a, 'b) t -> ('a, 'b) t -> int -> unit
Refer to Dense.Matrix.Generic
val dot : (float, 'b) t -> (float, 'b) t -> (float, 'b) t
Refer to Dense.Matrix.Generic
val inv : (float, 'b) t -> (float, 'b) t
Refer to Dense.Matrix.Generic
val trace : (float, 'b) t -> float
Refer to Dense.Matrix.Generic
val to_rows : ('a, 'b) t -> ('a, 'b) t array
Refer to Dense.Matrix.Generic
val of_rows : ('a, 'b) t array -> ('a, 'b) t
Refer to Dense.Matrix.Generic
val of_arrays : ('a, 'b) kind -> 'a array array -> ('a, 'b) t
Refer to Dense.Matrix.Generic
val draw_rows : ?replacement:bool -> ('a, 'b) t -> int -> ('a, 'b) t * int array
Refer to Dense.Matrix.Generic
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