Mavryk_benchmark.Scikit_matrix
type gen =
(float, Stdlib.Bigarray.float64_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Genarray.t
Genarrays.
val create : lines:int -> cols:int -> t
Create a matrix and initializes it to 0.0
val init : lines:int -> cols:int -> f:(int -> int -> float) -> t
Create and initializes a matrix.
val dim1 : t -> int
Number of lines.
val dim2 : t -> int
Number of columns.
val shape : t -> int * int
Lines x Columns
val set : t -> int -> int -> float -> unit
set m i j v
sets the element on line i
and column j
of m
to v.
val get : t -> int -> int -> float
get m i j
gets the element on line i
and column j
.
concat_columns_horiz [c1;...;cn]
returns the matrix having c1...cn as rows. The function fails if the columns have incoherent dimensions.
val to_numpy : t -> Pytypes.pyobject
Converts to a numpy Python object.
val to_numpy_vector :
(float, Stdlib.Bigarray.float64_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t ->
Pytypes.pyobject
Converts a vector to a numpy Python object.
val of_numpy : Pytypes.pyobject -> t
Converts from a numpy Python object.
val numpy_show : t -> string
String representation of matri via numpy.