package owl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Owl_sparse_ndarray_s end
type elt = float
Create sparse ndarray
val zeros : int array -> arr
val binary : ?density:float -> int array -> arr
val uniform : ?scale:float -> ?density:float -> int array -> arr
Obtain basic properties
val shape : arr -> int array
val num_dims : arr -> int
val nth_dim : arr -> int -> int
val numel : arr -> int
val nnz : arr -> int
val density : arr -> float
val same_shape : arr -> arr -> bool
Manipulate a N-dimensional array
val get : arr -> int array -> elt
val set : arr -> int array -> elt -> unit
val slice : int option array -> arr -> arr
val clone : arr -> arr
val flatten : arr -> arr
val reshape : arr -> int array -> arr
val transpose : ?axis:int array -> arr -> arr
val swap : int -> int -> arr -> arr
Iterate array elements
val iteri : ?axis:int option array -> (int array -> elt -> unit) -> arr -> unit
val iter : ?axis:int option array -> (elt -> unit) -> arr -> unit
val mapi : ?axis:int option array -> (int array -> elt -> elt) -> arr -> arr
val map : ?axis:int option array -> (elt -> elt) -> arr -> arr
val filteri : ?axis:int option array -> (int array -> elt -> bool) -> arr -> int array array
val filter : ?axis:int option array -> (elt -> bool) -> arr -> int array array
val foldi : ?axis:int option array -> (int array -> 'c -> elt -> 'c) -> 'c -> arr -> 'c
val fold : ?axis:int option array -> ('c -> elt -> 'c) -> 'c -> arr -> 'c
val iteri_nz : ?axis:int option array -> (int array -> elt -> unit) -> arr -> unit
val iter_nz : ?axis:int option array -> (elt -> unit) -> arr -> unit
val mapi_nz : ?axis:int option array -> (int array -> elt -> elt) -> arr -> arr
val map_nz : ?axis:int option array -> (elt -> elt) -> arr -> arr
val filteri_nz : ?axis:int option array -> (int array -> elt -> bool) -> arr -> int array array
val filter_nz : ?axis:int option array -> (elt -> bool) -> arr -> int array array
val foldi_nz : ?axis:int option array -> (int array -> 'c -> elt -> 'c) -> 'c -> arr -> 'c
val fold_nz : ?axis:int option array -> ('c -> elt -> 'c) -> 'c -> arr -> 'c
Examine array elements or compare two arrays
val exists : (elt -> bool) -> arr -> bool
val not_exists : (elt -> bool) -> arr -> bool
val for_all : (elt -> bool) -> arr -> bool
val is_zero : arr -> bool
val is_positive : arr -> bool
val is_negative : arr -> bool
val is_nonpositive : arr -> bool
val is_nonnegative : arr -> bool
val equal : arr -> arr -> bool
val not_equal : arr -> arr -> bool
val greater : arr -> arr -> bool
val less : arr -> arr -> bool
val greater_equal : arr -> arr -> bool
val less_equal : arr -> arr -> bool
Input/Output and helper functions
val to_array : arr -> (int array * elt) array
val of_array : int array -> (int array * elt) array -> arr
val print : arr -> unit
val save : arr -> string -> unit
val load : string -> arr
Unary mathematical operations
val min : arr -> elt
val max : arr -> elt
val minmax : arr -> elt * elt
val abs : arr -> arr
val neg : arr -> arr
val sum : arr -> elt
val average : arr -> elt
Binary mathematical operations
val add : arr -> arr -> arr
val sub : arr -> arr -> arr
val mul : arr -> arr -> arr
val div : arr -> arr -> arr
val add_scalar : arr -> elt -> arr
val sub_scalar : arr -> elt -> arr
val mul_scalar : arr -> elt -> arr
val div_scalar : arr -> elt -> arr
val scalar_add : elt -> arr -> arr
val scalar_sub : elt -> arr -> arr
val scalar_mul : elt -> arr -> arr
val scalar_div : elt -> arr -> arr
include module type of struct include Operator end
type ('a, 'b) op_t0 = ('a, 'b) Owl_sparse_ndarray_generic.t
val (+$) : ('a, 'b) Owl_sparse_ndarray_generic.t -> 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t
val (-$) : ('a, 'b) Owl_sparse_ndarray_generic.t -> 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t
val (*$) : ('a, 'b) Owl_sparse_ndarray_generic.t -> 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t
val (/$) : ('a, 'b) Owl_sparse_ndarray_generic.t -> 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t
val ($+) : 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t
val ($-) : 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t
val ($*) : 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t
val ($/) : 'a -> ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t
val (=) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (!=) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (<>) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (>) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (<) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (>=) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
val (<=) : ('a, 'b) Owl_sparse_ndarray_generic.t -> ('a, 'b) Owl_sparse_ndarray_generic.t -> bool
OCaml

Innovation. Community. Security.