Sparse.Ndarray.Generic

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

Github: {Signature} {Implementation}

Type definition

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

Type of kind.

type ('a, 'b) t

Abstract type of sparse ndarray.

Create sparse ndarray

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

TODO

source code

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

TODO

source code

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

TODO

source code

Obtain basic properties

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

val density : ('a, 'b) t -> float

TODO

source code

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

TODO

source code

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

TODO

source code

Manipulate a N-dimensional array

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

Iterate array elements

val iteri : ?axis:int option array -> (int array -> 'a -> unit) -> ('a, 'b) t -> unit

TODO

source code

val iter : ?axis:int option array -> ('a -> unit) -> ('a, 'b) t -> unit

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

val iteri_nz : ?axis:int option array -> (int array -> 'a -> unit) -> ('a, 'b) t -> unit

TODO

source code

val iter_nz : ?axis:int option array -> ('a -> unit) -> ('a, 'b) t -> unit

TODO

source code

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

TODO

source code

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

TODO

source code

val filteri_nz : ?axis:int option array -> (int array -> 'a -> bool) -> ('a, 'b) t -> int array array

TODO

source code

val filter_nz : ?axis:int option array -> ('a -> bool) -> ('a, 'b) t -> int array array

TODO

source code

val foldi_nz : ?axis:int option array -> (int array -> 'c -> 'a -> 'c) -> 'c -> ('a, 'b) t -> 'c

TODO

source code

val fold_nz : ?axis:int option array -> ('c -> 'a -> 'c) -> 'c -> ('a, 'b) t -> 'c

TODO

source code

Examine array elements or compare two arrays

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

Input/Output and helper functions

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

Unary mathematical operations

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

TODO

source code

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

TODO

source code

val minmax : ('a, 'b) t -> 'a * 'a

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

Binary mathematical operations

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code

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

TODO

source code