package owl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Owl_dense_matrix.GenericSource

include module type of struct include Owl_dense_matrix_generic end

About the comparison of two complex numbers ``x`` and ``y``, Owl uses the following conventions: 1) ``x`` and ``y`` are equal iff both real and imaginary parts are equal; 2) ``x`` is less than ``y`` if the magnitude of ``x`` is less than the magnitude of ``x``; in case both ``x`` and ``y`` have the same magnitudes, ``x`` is less than ``x`` if the phase of ``x`` is less than the phase of ``y``; 3) less or equal, greater, greater or equal relation can be further defined atop of the aforementioned conventions.

Type definition
Sourcetype ('a, 'b) t = ('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t

N-dimensional array type, i.e. Bigarray Genarray type.

Create matrices
Sourceval empty : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> ('a, 'b) t

``empty m n`` creates an ``m`` by ``n`` matrix without initialising the values of elements in ``x``.

Sourceval create : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> 'a -> ('a, 'b) t

``create m n a`` creates an ``m`` by ``n`` matrix and all the elements of ``x`` are initialised with the value ``a``.

Sourceval init : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> (int -> 'a) -> ('a, 'b) t

``init m n f`` creates a matrix ``x`` of shape ``m x n``, then using ``f`` to initialise the elements in ``x``. The input of ``f`` is 1-dimensional index of the matrix. You need to explicitly convert it if you need 2D index. The function ``Owl_utils.ind`` can help you.

Sourceval init_2d : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> (int -> int -> 'a) -> ('a, 'b) t

``init_2d m n f`` s almost the same as ``init`` but ``f`` receives 2D index as input. It is more convenient since you don't have to convert the index by yourself, but this also means ``init_2d`` is slower than ``init``.

Sourceval zeros : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> ('a, 'b) t

``zeros m n`` creates an ``m`` by ``n`` matrix where all the elements are initialised to zeros.

Sourceval ones : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> int -> ('a, 'b) t

``ones m n`` creates an ``m`` by ``n`` matrix where all the elements are ones.

Sourceval eye : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> ('a, 'b) t

``eye m`` creates an ``m`` by ``m`` identity matrix.

Sourceval complex : ('a, 'b) Owl_dense_ndarray_generic.kind -> ('c, 'd) Owl_dense_ndarray_generic.kind -> ('a, 'b) t -> ('a, 'b) t -> ('c, 'd) t

``complex re im`` constructs a complex ndarray/matrix from ``re`` and ``im``. ``re`` and ``im`` contain the real and imaginary part of ``x`` respectively.

Note that both ``re`` and ``im`` can be complex but must have same type. The real part of ``re`` will be the real part of ``x`` and the imaginary part of ``im`` will be the imaginary part of ``x``.

Sourceval polar : ('a, 'b) Owl_dense_ndarray_generic.kind -> ('c, 'd) Owl_dense_ndarray_generic.kind -> ('a, 'b) t -> ('a, 'b) t -> ('c, 'd) t

``complex rho theta`` constructs a complex ndarray/matrix from polar coordinates ``rho`` and ``theta``. ``rho`` contains the magnitudes and ``theta`` contains phase angles. Note that the behaviour is undefined if ``rho`` has negative elelments or ``theta`` has infinity elelments.

Sourceval sequential : ('a, 'b) Owl_dense_ndarray_generic.kind -> ?a:'a -> ?step:'a -> int -> int -> ('a, 'b) t

``sequential ~a ~step m n`` creates an ``m`` by ``n`` matrix. The elements in ``x`` are initialised sequentiallly from ``~a`` and is increased by ``~step``.

The default value of ``~a`` is zero whilst the default value of ``~step`` is one.

Sourceval uniform : ('a, 'b) Owl_dense_ndarray_generic.kind -> ?a:'a -> ?b:'a -> int -> int -> ('a, 'b) t

``uniform m n`` creates an ``m`` by ``n`` matrix where all the elements follow a uniform distribution in ``(0,1)`` interval. ``uniform ~scale:a m n`` adjusts the interval to ``(0,a)``.

Sourceval gaussian : ('a, 'b) Owl_dense_ndarray_generic.kind -> ?mu:'a -> ?sigma:'a -> int -> int -> ('a, 'b) t

``gaussian m n`` creates an ``m`` by ``n`` matrix where all the elements in ``x`` follow a Gaussian distribution with specified sigma. By default ``sigma = 1``.

Sourceval semidef : (float, 'b) Owl_dense_ndarray_generic.kind -> int -> (float, 'b) t

`` semidef n `` returns an random ``n`` by ``n`` positive semi-definite matrix.

Sourceval linspace : ('a, 'b) Owl_dense_ndarray_generic.kind -> 'a -> 'a -> int -> ('a, 'b) t

``linspace a b n`` linearly divides the interval ``a,b`` into ``n`` pieces by creating an ``m`` by ``1`` row vector. E.g., ``linspace 0. 5. 5`` will create a row vector ``0;1;2;3;4;5``.

Sourceval logspace : ('a, 'b) Owl_dense_ndarray_generic.kind -> ?base:float -> 'a -> 'a -> int -> ('a, 'b) t

``logspace base a b n`` ... the default value of base is ``e``.

Sourceval meshgrid : ('a, 'b) Owl_dense_ndarray_generic.kind -> 'a -> 'a -> 'a -> 'a -> int -> int -> ('a, 'b) t * ('a, 'b) t

``meshgrid a1 b1 a2 b2 n1 n2`` is similar to the ``meshgrid`` function in Matlab. It returns two matrices ``x`` and ``y`` where the row vectors in ``x`` are linearly spaced between ``a1,b1`` by ``n1`` whilst the column vectors in ``y`` are linearly spaced between ``(a2,b2)`` by ``n2``.

Sourceval meshup : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t * ('a, 'b) t

``meshup x y`` creates mesh grids by using two row vectors ``x`` and ``y``.

Sourceval bernoulli : ('a, 'b) Owl_dense_ndarray_generic.kind -> ?p:float -> int -> int -> ('a, 'b) t

``bernoulli k ~p:0.3 m n``

Sourceval diagm : ?k:int -> ('a, 'b) t -> ('a, 'b) t

``diagm k v`` creates a diagonal matrix using the elements in ``v`` as diagonal values. ``k`` specifies the main diagonal index. If ``k > 0`` then it is above the main diagonal, if ``k < 0`` then it is below the main diagonal. This function is the same as the ``diag`` function in Matlab.

Sourceval triu : ?k:int -> ('a, 'b) t -> ('a, 'b) t

``triu k x`` returns the element on and above the ``k``th diagonal of ``x``. ``k = 0`` is the main diagonal, ``k > 0`` is above the main diagonal, and ``k < 0`` is below the main diagonal.

Sourceval tril : ?k:int -> ('a, 'b) t -> ('a, 'b) t

``tril k x`` returns the element on and below the ``k``th diagonal of ``x``. ``k = 0`` is the main diagonal, ``k > 0`` is above the main diagonal, and ``k < 0`` is below the main diagonal.

Sourceval symmetric : ?upper:bool -> ('a, 'b) t -> ('a, 'b) t

``symmetric ~upper x`` creates a symmetric matrix using either upper or lower triangular part of ``x``. If ``upper`` is ``true`` then it uses the upper part, if ``upper`` is ``false``, then ``symmetric`` uses the lower part. By default ``upper`` is true.

Sourceval hermitian : ?upper:bool -> (Complex.t, 'a) t -> (Complex.t, 'a) t

``hermitian ~upper x`` creates a hermitian matrix based on ``x``. By default, the upper triangular part is used for creating the hermitian matrix, but you use the lower part by setting ``upper=false``

Sourceval bidiagonal : ?upper:bool -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``bidiagonal upper dv ev`` creates a bidiagonal matrix using ``dv`` and ``ev``. Both ``dv`` and ``ev`` are row vectors. ``dv`` is the main diagonal. If ``upper`` is ``true`` then ``ev`` is superdiagonal; if ``upper`` is ``false`` then ``ev`` is subdiagonal. By default, ``upper`` is ``true``.

NOTE: because the diagonal elements in a hermitian matrix must be real, the function set the imaginary part of the diagonal elements to zero by default. In other words, if the diagonal elements of ``x`` have non-zero imaginary parts, the imaginary parts will be dropped without a warning.

Sourceval toeplitz : ?c:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``toeplitz ~c r`` generates a toeplitz matrix using ``r`` and ``c``. Both ``r`` and ``c`` are row vectors of the same length. If the first elements of ``c`` is different from that of ``r``, ``r``'s first element will be used.

Note: 1) If ``c`` is not passed in, then ``c = r`` will be used. 2) If ``c`` is not passed in and ``r`` is complex, the ``c = conj r`` will be used. 3) If ``r`` and ``c`` have different length, then the result is a rectangular matrix.

Sourceval hankel : ?r:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``hankel ~r c`` generates a hankel matrix using ``r`` and ``c``. ``c`` will be the first column and ``r`` will be the last row of the returned matrix.

Note: 1) If only ``c`` is passed in, the elelments below the anti-diagnoal are zero. 2) If the last element of ``c`` is different from the first element of ``r`` then the first element of ``c`` prevails. 3) ``c`` and ``r`` can have different length, the return will be an rectangular matrix.

Sourceval hadamard : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> ('a, 'b) t

``hadamard k n`` constructs a hadamard matrix of order ``n``. For a hadamard ``H``, we have ``H'*H = n*I``. Currrently, this function handles only the cases where ``n``, ``n/12``, or ``n/20`` is a power of 2.

Sourceval magic : ('a, 'b) Owl_dense_ndarray_generic.kind -> int -> ('a, 'b) t

``magic k n`` constructs a ``n x n`` magic square matrix ``x``. The elements in ``x`` are consecutive numbers increasing from ``1`` to ``n^2``. ``n`` must ``n >= 3``.

There are three different algorithms to deal with ``n`` is odd, singly even, and doubly even respectively.

Obtain basic properties
Sourceval shape : ('a, 'b) t -> int * int

If ``x`` is an ``m`` by ``n`` matrix, ``shape x`` returns ``(m,n)``, i.e., the size of two dimensions of ``x``.

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

``row_num x`` returns the number of rows in matrix ``x``.

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

``col_num x`` returns the number of columns in matrix ``x``.

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

``numel x`` returns the number of elements in matrix ``x``. It is equivalent to ``(row_num x) * (col_num x)``.

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

``nnz x`` returns the number of non-zero elements in ``x``.

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

``density x`` returns the percentage of non-zero elements in ``x``.

Sourceval size_in_bytes : ('a, 'b) t -> int

``size_in_bytes x`` returns the size of ``x`` in bytes in memory.

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

``same_shape x y`` returns ``true`` if two matrics have the same shape.

Sourceval same_data : ('a, 'b) t -> ('a, 'b) t -> bool

Refer to :doc:`owl_dense_ndarray_generic`.

Sourceval kind : ('a, 'b) t -> ('a, 'b) Owl_dense_ndarray_generic.kind

``kind x`` returns the type of matrix ``x``.

Manipulate a matrix
Sourceval get : ('a, 'b) t -> int -> int -> 'a

``get x i j`` returns the value of element ``(i,j)`` of ``x``. The shorthand for ``get x i j`` is ``x.,j``

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

``set x i j a`` sets the element ``(i,j)`` of ``x`` to value ``a``. The shorthand for ``set x i j a`` is ``x.,j <- a``

Sourceval get_index : ('a, 'b) t -> int array array -> 'a array

``get_index i x`` returns an array of element values specified by the indices ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.

E.g., ``| [|1;2|]; [|3;4|] |`` returns the value of elements at position ``(1,3)`` and ``(2,4)`` respectively.

Sourceval set_index : ('a, 'b) t -> int array array -> 'a array -> unit

``set_index`` sets the value of elements in ``x`` according to the indices specified by ``i``. The length of array ``i`` equals the number of dimensions of ``x``. The arrays in ``i`` must have the same length, and each represents the indices in that dimension.

Sourceval get_fancy : Owl_types.index list -> ('a, 'b) t -> ('a, 'b) t

``get_fancy s x`` returns a copy of the slice in ``x``. The slice is defined by ``a`` which is an ``int array``. Please refer to the same function in the ``Owl_dense_ndarray_generic`` documentation for more details.

Sourceval set_fancy : Owl_types.index list -> ('a, 'b) t -> ('a, 'b) t -> unit

``set_fancy axis x y`` set the slice defined by ``axis`` in ``x`` according to the values in ``y``. ``y`` must have the same shape as the one defined by ``axis``.

About the slice definition of ``axis``, please refer to ``slice`` function.

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

``get_slice axis x`` aims to provide a simpler version of ``get_fancy``. This function assumes that every list element in the passed in ``in list list`` represents a range, i.e., ``R`` constructor.

E.g., ``[];[0;3];[0]`` is equivalent to ``R []; R [0;3]; R [0]``.

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

``set_slice axis x y`` aims to provide a simpler version of ``set_slice``. This function assumes that every list element in the passed in ``in list list`` represents a range, i.e., ``R`` constructor.

E.g., ``[];[0;3];[0]`` is equivalent to ``R []; R [0;3]; R [0]``.

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

``row x i`` returns row ``i`` of ``x``. Note: Unlike ``col``, the return value is simply a view onto the original row in ``x``, so modifying ``row``'s value also alters ``x``.

The function supports nagative indices.

Sourceval col : ('a, 'b) t -> int -> ('a, 'b) t

``col x j`` returns column ``j`` of ``x``. Note: Unlike ``row``, the return value is a copy of the original row in ``x``.

The function supports nagative indices.

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

``rows x a`` returns the rows (defined in an int array ``a``) of ``x``. The returned rows will be combined into a new dense matrix. The order of rows in the new matrix is the same as that in the array ``a``.

The function supports nagative indices.

Sourceval cols : ('a, 'b) t -> int array -> ('a, 'b) t

Similar to ``rows``, ``cols x a`` returns the columns (specified in array ``a``) of x in a new dense matrix.

The function supports nagative indices.

Sourceval resize : ?head:bool -> ('a, 'b) t -> int array -> ('a, 'b) t

``resize x s`` please refer to the Ndarray document.

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

``reshape x s`` returns a new ``m`` by ``n`` matrix from the ``m'`` by ``n'`` matrix ``x``. Note that ``(m * n)`` must be equal to ``(m' * n')``, and the returned matrix shares the same memory with the original ``x``.

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

``flatten x`` reshape ``x`` into a ``1`` by ``n`` row vector without making a copy. Therefore the returned value shares the same memory space with original ``x``.

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

``reverse x`` reverse the order of all elements in the flattened ``x`` and returns the results in a new matrix. The original ``x`` remains intact.

Sourceval flip : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``flip ~axis x`` flips a matrix/ndarray along ``axis``. By default ``axis = 0``. The result is returned in a new matrix/ndarray, so the original ``x`` remains intact.

Sourceval rotate : ('a, 'b) t -> int -> ('a, 'b) t

``rotate x d`` rotates ``x`` clockwise ``d`` degrees. ``d`` must be multiple times of ``90``, otherwise the function will fail. If ``x`` is an n-dimensional array, then the function rotates the plane formed by the first and second dimensions.

Sourceval reset : ('a, 'b) t -> unit

``reset x`` resets all the elements of ``x`` to zero value.

Sourceval fill : ('a, 'b) t -> 'a -> unit

``fill x a`` fills the ``x`` with value ``a``.

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

``copy x`` returns a copy of matrix ``x``.

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

``copy_row_to v x i`` copies an ``1`` by ``n`` row vector ``v`` to the ``ith`` row in an ``m`` by ``n`` matrix ``x``.

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

``copy_col_to v x j`` copies an ``1`` by ``n`` column vector ``v`` to the ``jth`` column in an ``m`` by ``n`` matrix ``x``.

Sourceval concat_vertical : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``concat_vertical x y`` concats two matrices ``x`` and ``y`` vertically, therefore their column numbers must be the same.

The associated operator is ``@=``, please refer to :doc:`owl_operator`.

Sourceval concat_horizontal : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``concat_horizontal x y`` concats two matrices ``x`` and ``y`` horizontally, therefore their row numbers must be the same.

The associated operator is ``@||``, please refer to :doc:`owl_operator`.

Sourceval concat_vh : ('a, 'b) t array array -> ('a, 'b) t

``concat_vh`` is used to assemble small parts of matrices into a bigger one. E.g. ``| [|a; b; c|]; [|d; e; f|]; [|g; h; i|] |`` will be concatenated into a big matrix as follows.

Please refer to :doc:`owl_dense_ndarray_generic`. for details.

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

``concatenate ~axis:1 x`` concatenates an array of matrices along the second dimension. For the matrices in ``x``, they must have the same shape except the dimension specified by ``axis``. The default value of ``axis`` is 0, i.e., the lowest dimension on a marix, i.e., rows.

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

``split ~axis parts x`` splits an ndarray ``x`` into parts along the specified ``axis``. This function is the inverse operation of ``concatenate``. The elements in ``x`` must sum up to the dimension in the specified axis.

Sourceval split_vh : (int * int) array array -> ('a, 'b) t -> ('a, 'b) t array array

Please refer to :doc:`owl_dense_ndarray_generic`. for details.

Sourceval transpose : ('a, 'b) t -> ('a, 'b) t

``transpose x`` transposes an ``m`` by ``n`` matrix to ``n`` by ``m`` one.

Sourceval ctranspose : ('a, 'b) t -> ('a, 'b) t

``ctranspose x`` performs conjugate transpose of a complex matrix ``x``. If ``x`` is a real matrix, then ``ctranspose x`` is equivalent to ``transpose x``.

Sourceval diag : ?k:int -> ('a, 'b) t -> ('a, 'b) t

``diag k x`` returns the ``k``th diagonal elements of ``x``. ``k > 0`` means above the main diagonal and ``k < 0`` means the below the main diagonal.

Sourceval swap_rows : ('a, 'b) t -> int -> int -> unit

``swap_rows x i i'`` swaps the row ``i`` with row ``i'`` of ``x``.

Sourceval swap_cols : ('a, 'b) t -> int -> int -> unit

``swap_cols x j j'`` swaps the column ``j`` with column ``j'`` of ``x``.

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

``tile x a`` provides the exact behaviour as ``numpy.tile`` function.

Sourceval repeat : ('a, 'b) t -> int array -> ('a, 'b) t

``repeat x a`` repeats the elements ``x`` according the repetition specified by ``a``.

Sourceval pad : ?v:'a -> int list list -> ('a, 'b) t -> ('a, 'b) t

``padd ~v:0. [1;1] x``

Sourceval dropout : ?rate:float -> ('a, 'b) t -> ('a, 'b) t

``dropout ~rate:0.3 x`` drops out 30% of the elements in ``x``, in other words, by setting their values to zeros.

Sourceval top : ('a, 'b) t -> int -> int array array

``top x n`` returns the indices of ``n`` greatest values of ``x``. The indices are arranged according to the corresponding element values, from the greatest one to the smallest one.

Sourceval bottom : ('a, 'b) t -> int -> int array array

``bottom x n`` returns the indices of ``n`` smallest values of ``x``. The indices are arranged according to the corresponding element values, from the smallest one to the greatest one.

Sourceval sort : ('a, 'b) t -> ('a, 'b) t

``sort x`` performs quicksort of the elelments in ``x``. A new copy is returned as result, the original ``x`` remains intact. If you want to perform in-place sorting, please use `sort_` instead.

Sourceval argsort : ('a, 'b) t -> (int64, Bigarray.int64_elt) t

``argsort x`` returns the indices with which the elements in ``x`` are sorted in increasing order. Note that the returned index ndarray has the same shape as that of ``x``, and the indices are 1D indices.

Iteration functions
Sourceval iteri : (int -> 'a -> unit) -> ('a, 'b) t -> unit

``iteri f x`` iterates all the elements in ``x`` and applies the user defined function ``f : int -> int -> float -> 'a``. ``f i j v`` takes three parameters, ``i`` and ``j`` are the coordinates of current element, and ``v`` is its value.

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

``iter f x`` is the same as as ``iteri f x`` except the coordinates of the current element is not passed to the function ``f : float -> 'a``

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

``mapi f x`` maps each element in ``x`` to a new value by applying ``f : int -> int -> float -> float``. The first two parameters are the coordinates of the element, and the third parameter is the value.

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

``map f x`` is similar to ``mapi f x`` except the coordinates of the current element is not passed to the function ``f : float -> float``

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

``foldi ~axis f a x`` folds (or reduces) the elements in ``x`` from left along the specified ``axis`` using passed in function ``f``. ``a`` is the initial element and in ``f i acc b`` ``acc`` is the accumulater and ``b`` is one of the elemets in ``x`` along the same axis. Note that ``i`` is 1d index of ``b``.

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

Similar to ``foldi``, except that the index of an element is not passed to ``f``.

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

``scan ~axis f x`` scans the ``x`` along the specified ``axis`` using passed in function ``f``. ``f acc a b`` returns an updated ``acc`` which will be passed in the next call to ``f i acc a``. This function can be used to implement accumulative operations such as ``sum`` and ``prod`` functions. Note that the ``i`` is 1d index of ``a`` in ``x``.

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

Similar to ``scani``, except that the index of an element is not passed to ``f``.

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

``filteri f x`` uses ``f : int -> int -> float -> bool`` to filter out certain elements in ``x``. An element will be included if ``f`` returns ``true``. The returned result is a list of coordinates of the selected elements.

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

Similar to ``filteri``, but the coordinates of the elements are not passed to the function ``f : float -> bool``.

Sourceval iteri_2d : (int -> int -> 'a -> unit) -> ('a, 'b) t -> unit

Similar to `iteri` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval mapi_2d : (int -> int -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Similar to `mapi` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval foldi_2d : ?axis:int -> (int -> int -> 'a -> 'a -> 'a) -> 'a -> ('a, 'b) t -> ('a, 'b) t

Similar to `foldi` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval scani_2d : ?axis:int -> (int -> int -> 'a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t

Similar to `scani` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval filteri_2d : (int -> int -> 'a -> bool) -> ('a, 'b) t -> (int * int) array

Similar to `filteri` but 2d indices ``(i,j)`` are returned.

Sourceval iter2i_2d : (int -> int -> 'a -> 'c -> unit) -> ('a, 'b) t -> ('c, 'd) t -> unit

Similar to `iter2i` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval map2i_2d : (int -> int -> 'a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

Similar to `map2i` but 2d indices ``(i,j)`` are passed to the user function.

Sourceval iter2i : (int -> 'a -> 'b -> unit) -> ('a, 'c) t -> ('b, 'd) t -> unit

Similar to ``iteri`` but applies to two matrices ``x`` and ``y``. Both ``x`` and ``y`` must have the same shape.

Sourceval iter2 : ('a -> 'b -> unit) -> ('a, 'c) t -> ('b, 'd) t -> unit

Similar to ``iter2i``, except that the index is not passed to ``f``.

Sourceval map2i : (int -> 'a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``map2i f x y`` applies ``f`` to two elements of the same position in both ``x`` and ``y``. Note that 1d index is passed to funciton ``f``.

Sourceval map2 : ('a -> 'a -> 'a) -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``map2 f x y`` is similar to ``map2i f x y`` except the index is not passed.

Sourceval iteri_rows : (int -> ('a, 'b) t -> unit) -> ('a, 'b) t -> unit

``iteri_rows f x`` iterates every row in ``x`` and applies function ``f : int -> mat -> unit`` to each of them.

Sourceval iter_rows : (('a, 'b) t -> unit) -> ('a, 'b) t -> unit

Similar to ``iteri_rows`` except row number is not passed to ``f``.

Sourceval iter2i_rows : (int -> ('a, 'b) t -> ('a, 'b) t -> unit) -> ('a, 'b) t -> ('a, 'b) t -> unit

``iter2_rows f x y`` iterates rows of two matrices ``x`` and ```y``.

Sourceval iter2_rows : (('a, 'b) t -> ('a, 'b) t -> unit) -> ('a, 'b) t -> ('a, 'b) t -> unit

Similar to ``iter2iter2i_rows`` but without passing in indices.

Sourceval iteri_cols : (int -> ('a, 'b) t -> unit) -> ('a, 'b) t -> unit

``iteri_cols f x`` iterates every column in ``x`` and applies function ``f : int -> mat -> unit`` to each of them. Column number is passed to ``f`` as the first parameter.

Sourceval iter_cols : (('a, 'b) t -> unit) -> ('a, 'b) t -> unit

Similar to ``iteri_cols`` except col number is not passed to ``f``.

Sourceval filteri_rows : (int -> ('a, 'b) t -> bool) -> ('a, 'b) t -> int array

``filteri_rows f x`` uses function ``f : int -> mat -> bool`` to check each row in ``x``, then returns an int array containing the indices of those rows which satisfy the function ``f``.

Sourceval filter_rows : (('a, 'b) t -> bool) -> ('a, 'b) t -> int array

Similar to ``filteri_rows`` except that the row indices are not passed to ``f``.

Sourceval filteri_cols : (int -> ('a, 'b) t -> bool) -> ('a, 'b) t -> int array

``filteri_cols f x`` uses function ``f : int -> mat -> bool`` to check each column in ``x``, then returns an int array containing the indices of those columns which satisfy the function ``f``.

Sourceval filter_cols : (('a, 'b) t -> bool) -> ('a, 'b) t -> int array

Similar to ``filteri_cols`` except that the column indices are not passed to ``f``.

Sourceval fold_rows : ('c -> ('a, 'b) t -> 'c) -> 'c -> ('a, 'b) t -> 'c

``fold_rows f a x`` folds all the rows in ``x`` using function ``f``. The order of folding is from the first row to the last one.

Sourceval fold_cols : ('c -> ('a, 'b) t -> 'c) -> 'c -> ('a, 'b) t -> 'c

``fold_cols f a x`` folds all the columns in ``x`` using function ``f``. The order of folding is from the first column to the last one.

Sourceval mapi_rows : (int -> ('a, 'b) t -> 'c) -> ('a, 'b) t -> 'c array

``mapi_rows f x`` maps every row in ``x`` to a type ``'a`` value by applying function ``f : int -> mat -> 'a`` to each of them. The results is an array of all the returned values.

Sourceval map_rows : (('a, 'b) t -> 'c) -> ('a, 'b) t -> 'c array

Similar to ``mapi_rows`` except row number is not passed to ``f``.

Sourceval mapi_cols : (int -> ('a, 'b) t -> 'c) -> ('a, 'b) t -> 'c array

``mapi_cols f x`` maps every column in ``x`` to a type ``'a`` value by applying function ``f : int -> mat -> 'a``.

Sourceval map_cols : (('a, 'b) t -> 'c) -> ('a, 'b) t -> 'c array

Similar to ``mapi_cols`` except column number is not passed to ``f``.

Sourceval mapi_by_row : int -> (int -> ('a, 'b) t -> ('a, 'b) t) -> ('a, 'b) t -> ('a, 'b) t

``mapi_by_row d f x`` applies ``f`` to each row of a ``m`` by ``n`` matrix ``x``, then uses the returned ``d`` dimensional row vectors to assemble a new ``m`` by ``d`` matrix.

Sourceval map_by_row : int -> (('a, 'b) t -> ('a, 'b) t) -> ('a, 'b) t -> ('a, 'b) t

``map_by_row d f x`` is similar to ``mapi_by_row`` except that the row indices are not passed to ``f``.

Sourceval mapi_by_col : int -> (int -> ('a, 'b) t -> ('a, 'b) t) -> ('a, 'b) t -> ('a, 'b) t

``mapi_by_col d f x`` applies ``f`` to each column of a ``m`` by ``n`` matrix ``x``, then uses the returned ``d`` dimensional column vectors to assemble a new ``d`` by ``n`` matrix.

Sourceval map_by_col : int -> (('a, 'b) t -> ('a, 'b) t) -> ('a, 'b) t -> ('a, 'b) t

``map_by_col d f x`` is similar to ``mapi_by_col`` except that the column indices are not passed to ``f``.

Sourceval mapi_at_row : (int -> 'a -> 'a) -> ('a, 'b) t -> int -> ('a, 'b) t

``mapi_at_row f x i`` creates a new matrix by applying function ``f`` only to the ``i``th row in matrix ``x``.

Sourceval map_at_row : ('a -> 'a) -> ('a, 'b) t -> int -> ('a, 'b) t

``map_at_row f x i`` is similar to ``mapi_at_row`` except that the coordinates of an element is not passed to ``f``.

Sourceval mapi_at_col : (int -> 'a -> 'a) -> ('a, 'b) t -> int -> ('a, 'b) t

``mapi_at_col f x j`` creates a new matrix by applying function ``f`` only to the ``j``th column in matrix ``x``.

Sourceval map_at_col : ('a -> 'a) -> ('a, 'b) t -> int -> ('a, 'b) t

``map_at_col f x i`` is similar to ``mapi_at_col`` except that the coordinates of an element is not passed to ``f``.

Examination & Comparison
Sourceval exists : ('a -> bool) -> ('a, 'b) t -> bool

``exists f x`` checks all the elements in ``x`` using ``f``. If at least one element satisfies ``f`` then the function returns ``true`` otherwise ``false``.

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

``not_exists f x`` checks all the elements in ``x``, the function returns ``true`` only if all the elements fail to satisfy ``f : float -> bool``.

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

``for_all f x`` checks all the elements in ``x``, the function returns ``true`` if and only if all the elements pass the check of function ``f``.

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

``is_zero x`` returns ``true`` if all the elements in ``x`` are zeros.

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

``is_positive x`` returns ``true`` if all the elements in ``x`` are positive.

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

``is_negative x`` returns ``true`` if all the elements in ``x`` are negative.

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

``is_nonpositive`` returns ``true`` if all the elements in ``x`` are non-positive.

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

``is_nonnegative`` returns ``true`` if all the elements in ``x`` are non-negative.

Sourceval is_normal : ('a, 'b) t -> bool

``is_normal x`` returns ``true`` if all the elelments in ``x`` are normal float numbers, i.e., not ``NaN``, not ``INF``, not ``SUBNORMAL``. Please refer to

https://www.gnu.org/software/libc/manual/html_node/Floating-Point-Classes.html https://www.gnu.org/software/libc/manual/html_node/Infinity-and-NaN.html#Infinity-and-NaN

Sourceval not_nan : ('a, 'b) t -> bool

``not_nan x`` returns ``false`` if there is any ``NaN`` element in ``x``. Otherwise, the function returns ``true`` indicating all the numbers in ``x`` are not ``NaN``.

Sourceval not_inf : ('a, 'b) t -> bool

``not_inf x`` returns ``false`` if there is any positive or negative ``INF`` element in ``x``. Otherwise, the function returns ``true``.

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

``equal x y`` returns ``true`` if two matrices ``x`` and ``y`` are equal.

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

``not_equal x y`` returns ``true`` if there is at least one element in ``x`` is not equal to that in ``y``.

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

``greater x y`` returns ``true`` if all the elements in ``x`` are greater than the corresponding elements in ``y``.

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

``less x y`` returns ``true`` if all the elements in ``x`` are smaller than the corresponding elements in ``y``.

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

``greater_equal x y`` returns ``true`` if all the elements in ``x`` are not smaller than the corresponding elements in ``y``.

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

``less_equal x y`` returns ``true`` if all the elements in ``x`` are not greater than the corresponding elements in ``y``.

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

``elt_equal x y`` performs element-wise ``=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a = b``.

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

``elt_not_equal x y`` performs element-wise ``!=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a <> b``.

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

``elt_less x y`` performs element-wise ``<`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a < b``.

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

``elt_greater x y`` performs element-wise ``>`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a > b``.

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

``elt_less_equal x y`` performs element-wise ``<=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a <= b``.

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

``elt_greater_equal x y`` performs element-wise ``>=`` comparison of ``x`` and ``y``. Assume that ``a`` is from ``x`` and ``b`` is the corresponding element of ``a`` from ``y`` of the same position. The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` indicates ``a >= b``.

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

``equal_scalar x a`` checks if all the elements in ``x`` are equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b = a``.

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

``not_equal_scalar x a`` checks if all the elements in ``x`` are not equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b <> a``.

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

``less_scalar x a`` checks if all the elements in ``x`` are less than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b < a``.

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

``greater_scalar x a`` checks if all the elements in ``x`` are greater than ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b > a``.

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

``less_equal_scalar x a`` checks if all the elements in ``x`` are less or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b <= a``.

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

``greater_equal_scalar x a`` checks if all the elements in ``x`` are greater or equal to ``a``. The function returns ``true`` iff for every element ``b`` in ``x``, ``b >= a``.

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

``elt_equal_scalar x a`` performs element-wise ``=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a = b``, otherwise ``0``.

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

``elt_not_equal_scalar x a`` performs element-wise ``!=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a <> b``, otherwise ``0``.

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

``elt_less_scalar x a`` performs element-wise ``<`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a < b``, otherwise ``0``.

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

``elt_greater_scalar x a`` performs element-wise ``>`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a > b``, otherwise ``0``.

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

``elt_less_equal_scalar x a`` performs element-wise ``<=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a <= b``, otherwise ``0``.

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

``elt_greater_equal_scalar x a`` performs element-wise ``>=`` comparison of ``x`` and ``a``. Assume that ``b`` is one element from ``x`` The function returns another binary (``0`` and ``1``) ndarray/matrix wherein ``1`` of the corresponding position indicates ``a >= b``, otherwise ``0``.

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

``approx_equal ~eps x y`` returns ``true`` if ``x`` and ``y`` are approximately equal, i.e., for any two elements ``a`` from ``x`` and ``b`` from ``y``, we have ``abs (a - b) < eps``.

Note: the threshold check is exclusive for passed in ``eps``.

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

``approx_equal_scalar ~eps x a`` returns ``true`` all the elements in ``x`` are approximately equal to ``a``, i.e., ``abs (x - a) < eps``. For complex numbers, the ``eps`` applies to both real and imaginary part.

Note: the threshold check is exclusive for the passed in ``eps``.

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

``approx_elt_equal ~eps x y`` compares the element-wise equality of ``x`` and ``y``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that two corresponding elements ``a`` from ``x`` and ``b`` from ``y`` are considered as approximately equal, namely ``abs (a - b) < eps``.

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

``approx_elt_equal_scalar ~eps x a`` compares all the elements of ``x`` to a scalar value ``a``, then returns another binary (i.e., ``0`` and ``1``) ndarray/matrix wherein ``1`` indicates that the element ``b`` from ``x`` is considered as approximately equal to ``a``, namely ``abs (a - b) < eps``.

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

``draw_rows x m`` draws ``m`` rows randomly from ``x``. The row indices are also returned in an int array along with the selected rows. The parameter ``replacement`` indicates whether the drawing is by replacement or not.

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

``draw_cols x m`` draws ``m`` cols randomly from ``x``. The column indices are also returned in an int array along with the selected columns. The parameter ``replacement`` indicates whether the drawing is by replacement or not.

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

``draw_rows2 x y c`` is similar to ``draw_rows`` but applies to two matrices.

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

``draw_col2 x y c`` is similar to ``draw_cols`` but applies to two matrices.

Sourceval shuffle_rows : ('a, 'b) t -> ('a, 'b) t

``shuffle_rows x`` shuffles all the rows in matrix ``x``.

Sourceval shuffle_cols : ('a, 'b) t -> ('a, 'b) t

``shuffle_cols x`` shuffles all the columns in matrix ``x``.

Sourceval shuffle : ('a, 'b) t -> ('a, 'b) t

``shuffle x`` shuffles all the elements in ``x`` by first shuffling along the rows then shuffling along columns. It is equivalent to ``shuffle_cols (shuffle_rows x)``.

Input/Output functions
Sourceval to_array : ('a, 'b) t -> 'a array

``to_array x`` flattens an ``m`` by ``n`` matrix ``x`` then returns ``x`` as an float array of length ``(numel x)``.

Sourceval of_array : ('a, 'b) Owl_dense_ndarray_generic.kind -> 'a array -> int -> int -> ('a, 'b) t

``of_array x m n`` converts a float array ``x`` into an ``m`` by ``n`` matrix. Note the length of ``x`` must be equal to ``(m * n)``.

Similar to ``reshape`` function, you can pass in one negative index to let Owl automatically infer its dimension.

Sourceval to_arrays : ('a, 'b) t -> 'a array array

``to arrays x`` returns an array of float arrays, wherein each row in ``x`` becomes an array in the result.

Sourceval of_arrays : ('a, 'b) Owl_dense_ndarray_generic.kind -> 'a array array -> ('a, 'b) t

``of_arrays x`` converts an array of ``m`` float arrays (of length ``n``) in to an ``m`` by ``n`` matrix.

Sourceval to_rows : ('a, 'b) t -> ('a, 'b) t array
Sourceval of_rows : ('a, 'b) t array -> ('a, 'b) t
Sourceval to_cols : ('a, 'b) t -> ('a, 'b) t array
Sourceval of_cols : ('a, 'b) t array -> ('a, 'b) t
Sourceval print : ?max_row:int -> ?max_col:int -> ?header:bool -> ?fmt:('a -> string) -> ('a, 'b) t -> unit

``print x`` pretty prints matrix ``x`` without headings.

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

``save x f`` saves the matrix ``x`` to a file with the name ``f``. The format is binary by using ``Marshal`` module to serialise the matrix.

Sourceval load : ('a, 'b) Owl_dense_ndarray_generic.kind -> string -> ('a, 'b) t

``load f`` loads a matrix from file ``f``. The file must be previously saved by using ``save`` function.

Sourceval save_txt : ?sep:string -> ?append:bool -> ('a, 'b) t -> string -> unit

``save_txt ~sep ~append x f`` saves the matrix ``x`` into a text file ``f`` delimited by the specified string ``sep`` (default: tab). If ``append`` is ``false`` (it is by default), an existing file will be truncated and overwritten. If ``append`` is ``true`` and the file exists, new rows will be appended to it. Files are created, if necessary, with the AND of 0o644 and the user's umask value. Note that the operation can be very time consuming.

Sourceval load_txt : ?sep:string -> ('a, 'b) Owl_dense_ndarray_generic.kind -> string -> ('a, 'b) t

``load_txt ~sep k f`` load a text file ``f`` into a matrix of type ``k``. The delimitor is specified by ``sep`` which can be a regular expression.

Unary math operators

``re_c2s x`` returns all the real components of ``x`` in a new ndarray of same shape.

``re_d2z x`` returns all the real components of ``x`` in a new ndarray of same shape.

``im_c2s x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.

``im_d2z x`` returns all the imaginary components of ``x`` in a new ndarray of same shape.

Sourceval min : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``min x`` returns the minimum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the minimum of all the elements will be returned. For two complex numbers, the one with the smaller magnitude will be selected. If two magnitudes are the same, the one with the smaller phase will be selected.

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

``min' x`` is similar to ``min`` but returns the minimum of all elements in ``x`` in scalar value.

Sourceval max : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``max x`` returns the maximum of all elements in ``x`` along specified ``axis``. If no axis is specified, ``x`` will be flattened and the maximum of all the elements will be returned. For two complex numbers, the one with the greater magnitude will be selected. If two magnitudes are the same, the one with the greater phase will be selected.

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

``max' x`` is similar to ``max`` but returns the maximum of all elements in ``x`` in scalar value.

Sourceval minmax : ?axis:int -> ('a, 'b) t -> ('a, 'b) t * ('a, 'b) t

``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.

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

``minmax' x`` returns ``(min_v, max_v)``, ``min_v`` is the minimum value in ``x`` while ``max_v`` is the maximum.

Sourceval min_i : ('a, 'b) t -> 'a * int array

``min_i x`` returns the minimum of all elements in ``x`` as well as its index.

Sourceval max_i : ('a, 'b) t -> 'a * int array

``max_i x`` returns the maximum of all elements in ``x`` as well as its index.

Sourceval minmax_i : ('a, 'b) t -> ('a * int array) * ('a * int array)

``minmax_i x`` returns ``((min_v,min_i), (max_v,max_i))`` where ``(min_v,min_i)`` is the minimum value in ``x`` along with its index while ``(max_v,max_i)`` is the maximum value along its index.

Sourceval trace : ('a, 'b) t -> 'a

``trace x`` returns the sum of diagonal elements in ``x``.

Sourceval sum : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``sum_ axis x`` sums the elements in ``x`` along specified ``axis``.

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

``sum x`` returns the summation of all the elements in ``x``.

Sourceval prod : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``prod_ axis x`` multiplies the elements in ``x`` along specified ``axis``.

Sourceval prod' : ('a, 'b) t -> 'a

``prod x`` returns the product of all the elements in ``x``.

Sourceval mean : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``mean ~axis x`` calculates the mean along specified ``axis``.

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

``mean' x`` calculates the mean of all the elements in ``x``.

Sourceval var : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``var ~axis x`` calculates the variance along specified ``axis``.

Sourceval var' : ('a, 'b) t -> 'a

``var' x`` calculates the variance of all the elements in ``x``.

Sourceval std : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``std ~axis`` calculates the standard deviation along specified ``axis``.

Sourceval std' : ('a, 'b) t -> 'a

``std' x`` calculates the standard deviation of all the elements in ``x``.

Sourceval sum_rows : ('a, 'b) t -> ('a, 'b) t

``sum_rows x`` returns the summation of all the row vectors in ``x``.

Sourceval sum_cols : ('a, 'b) t -> ('a, 'b) t

``sum_cols`` returns the summation of all the column vectors in ``x``.

Sourceval mean_rows : ('a, 'b) t -> ('a, 'b) t

``mean_rows x`` returns the mean value of all row vectors in ``x``. It is equivalent to ``div_scalar (sum_rows x) (float_of_int (row_num x))``.

Sourceval mean_cols : ('a, 'b) t -> ('a, 'b) t

``mean_cols x`` returns the mean value of all column vectors in ``x``. It is equivalent to ``div_scalar (sum_cols x) (float_of_int (col_num x))``.

Sourceval min_rows : (float, 'b) t -> (float * int * int) array

``min_rows x`` returns the minimum value in each row along with their coordinates.

Sourceval min_cols : (float, 'b) t -> (float * int * int) array

``min_cols x`` returns the minimum value in each column along with their coordinates.

Sourceval max_rows : (float, 'b) t -> (float * int * int) array

``max_rows x`` returns the maximum value in each row along with their coordinates.

Sourceval max_cols : (float, 'b) t -> (float * int * int) array

``max_cols x`` returns the maximum value in each column along with their coordinates.

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

``abs x`` returns the absolute value of all elements in ``x`` in a new matrix.

``abs_c2s x`` is similar to ``abs`` but takes ``complex32`` as input.

``abs_z2d x`` is similar to ``abs`` but takes ``complex64`` as input.

Sourceval abs2 : ('a, 'b) t -> ('a, 'b) t

``abs2 x`` returns the square of absolute value of all elements in ``x`` in a new ndarray.

``abs2_c2s x`` is similar to ``abs2`` but takes ``complex32`` as input.

``abs2_z2d x`` is similar to ``abs2`` but takes ``complex64`` as input.

Sourceval conj : ('a, 'b) t -> ('a, 'b) t

``conj x`` computes the conjugate of the elements in ``x`` and returns the result in a new matrix. If the passed in ``x`` is a real matrix, the function simply returns a copy of the original ``x``.

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

``neg x`` negates the elements in ``x`` and returns the result in a new matrix.

Sourceval reci : ('a, 'b) t -> ('a, 'b) t

``reci x`` computes the reciprocal of every elements in ``x`` and returns the result in a new ndarray.

Sourceval reci_tol : ?tol:'a -> ('a, 'b) t -> ('a, 'b) t

``reci_tol ~tol x`` computes the reciprocal of every element in ``x``. Different from ``reci``, ``reci_tol`` sets the elements whose ``abs`` value smaller than ``tol`` to zeros. If ``tol`` is not specified, the defautl ``Owl_utils.eps Float32`` will be used. For complex numbers, refer to Owl's doc to see how to compare.

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

``signum`` computes the sign value (``-1`` for negative numbers, ``0`` (or ``-0``) for zero, ``1`` for positive numbers, ``nan`` for ``nan``).

Sourceval sqr : ('a, 'b) t -> ('a, 'b) t

``sqr x`` computes the square of the elements in ``x`` and returns the result in a new matrix.

Sourceval sqrt : ('a, 'b) t -> ('a, 'b) t

``sqrt x`` computes the square root of the elements in ``x`` and returns the result in a new matrix.

Sourceval cbrt : ('a, 'b) t -> ('a, 'b) t

``cbrt x`` computes the cubic root of the elements in ``x`` and returns the result in a new matrix.

Sourceval exp : ('a, 'b) t -> ('a, 'b) t

``exp x`` computes the exponential of the elements in ``x`` and returns the result in a new matrix.

Sourceval exp2 : ('a, 'b) t -> ('a, 'b) t

``exp2 x`` computes the base-2 exponential of the elements in ``x`` and returns the result in a new matrix.

Sourceval exp10 : ('a, 'b) t -> ('a, 'b) t

``exp2 x`` computes the base-10 exponential of the elements in ``x`` and returns the result in a new matrix.

Sourceval expm1 : ('a, 'b) t -> ('a, 'b) t

``expm1 x`` computes ``exp x -. 1.`` of the elements in ``x`` and returns the result in a new matrix.

Sourceval log : ('a, 'b) t -> ('a, 'b) t

``log x`` computes the logarithm of the elements in ``x`` and returns the result in a new matrix.

Sourceval log10 : ('a, 'b) t -> ('a, 'b) t

``log10 x`` computes the base-10 logarithm of the elements in ``x`` and returns the result in a new matrix.

Sourceval log2 : ('a, 'b) t -> ('a, 'b) t

``log2 x`` computes the base-2 logarithm of the elements in ``x`` and returns the result in a new matrix.

Sourceval log1p : ('a, 'b) t -> ('a, 'b) t

``log1p x`` computes ``log (1 + x)`` of the elements in ``x`` and returns the result in a new matrix.

Sourceval sin : ('a, 'b) t -> ('a, 'b) t

``sin x`` computes the sine of the elements in ``x`` and returns the result in a new matrix.

Sourceval cos : ('a, 'b) t -> ('a, 'b) t

``cos x`` computes the cosine of the elements in ``x`` and returns the result in a new matrix.

Sourceval tan : ('a, 'b) t -> ('a, 'b) t

``tan x`` computes the tangent of the elements in ``x`` and returns the result in a new matrix.

Sourceval asin : ('a, 'b) t -> ('a, 'b) t

``asin x`` computes the arc sine of the elements in ``x`` and returns the result in a new matrix.

Sourceval acos : ('a, 'b) t -> ('a, 'b) t

``acos x`` computes the arc cosine of the elements in ``x`` and returns the result in a new matrix.

Sourceval atan : ('a, 'b) t -> ('a, 'b) t

``atan x`` computes the arc tangent of the elements in ``x`` and returns the result in a new matrix.

Sourceval sinh : ('a, 'b) t -> ('a, 'b) t

``sinh x`` computes the hyperbolic sine of the elements in ``x`` and returns the result in a new matrix.

Sourceval cosh : ('a, 'b) t -> ('a, 'b) t

``cosh x`` computes the hyperbolic cosine of the elements in ``x`` and returns the result in a new matrix.

Sourceval tanh : ('a, 'b) t -> ('a, 'b) t

``tanh x`` computes the hyperbolic tangent of the elements in ``x`` and returns the result in a new matrix.

Sourceval asinh : ('a, 'b) t -> ('a, 'b) t

``asinh x`` computes the hyperbolic arc sine of the elements in ``x`` and returns the result in a new matrix.

Sourceval acosh : ('a, 'b) t -> ('a, 'b) t

``acosh x`` computes the hyperbolic arc cosine of the elements in ``x`` and returns the result in a new matrix.

Sourceval atanh : ('a, 'b) t -> ('a, 'b) t

``atanh x`` computes the hyperbolic arc tangent of the elements in ``x`` and returns the result in a new matrix.

Sourceval floor : ('a, 'b) t -> ('a, 'b) t

``floor x`` computes the floor of the elements in ``x`` and returns the result in a new matrix.

Sourceval ceil : ('a, 'b) t -> ('a, 'b) t

``ceil x`` computes the ceiling of the elements in ``x`` and returns the result in a new matrix.

Sourceval round : ('a, 'b) t -> ('a, 'b) t

``round x`` rounds the elements in ``x`` and returns the result in a new matrix.

Sourceval trunc : ('a, 'b) t -> ('a, 'b) t

``trunc x`` computes the truncation of the elements in ``x`` and returns the result in a new matrix.

Sourceval fix : ('a, 'b) t -> ('a, 'b) t

``fix x`` rounds each element of ``x`` to the nearest integer toward zero. For positive elements, the behavior is the same as ``floor``. For negative ones, the behavior is the same as ``ceil``.

Sourceval modf : ('a, 'b) t -> ('a, 'b) t * ('a, 'b) t

``modf x`` performs ``modf`` over all the elements in ``x``, the fractal part is saved in the first element of the returned tuple whereas the integer part is saved in the second element.

Sourceval erf : (float, 'a) t -> (float, 'a) t

``erf x`` computes the error function of the elements in ``x`` and returns the result in a new matrix.

Sourceval erfc : (float, 'a) t -> (float, 'a) t

``erfc x`` computes the complementary error function of the elements in ``x`` and returns the result in a new matrix.

Sourceval logistic : (float, 'a) t -> (float, 'a) t

``logistic x`` computes the logistic function ``1/(1 + exp(-a)`` of the elements in ``x`` and returns the result in a new matrix.

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

``relu x`` computes the rectified linear unit function ``max(x, 0)`` of the elements in ``x`` and returns the result in a new matrix.

Sourceval elu : ?alpha:float -> (float, 'a) t -> (float, 'a) t

refer to ``Owl_dense_ndarray_generic.elu``

Sourceval leaky_relu : ?alpha:float -> (float, 'a) t -> (float, 'a) t

refer to ``Owl_dense_ndarray_generic.leaky_relu``

Sourceval softplus : (float, 'a) t -> (float, 'a) t

``softplus x`` computes the softplus function ``log(1 + exp(x)`` of the elements in ``x`` and returns the result in a new matrix.

Sourceval softsign : (float, 'a) t -> (float, 'a) t

``softsign x`` computes the softsign function ``x / (1 + abs(x))`` of the elements in ``x`` and returns the result in a new matrix.

Sourceval softmax : ?axis:int -> (float, 'a) t -> (float, 'a) t

``softmax x`` computes the softmax functions ``(exp x) / (sum (exp x))`` of all the elements along the specified ``axis`` in ``x`` and returns the result in a new ndarray.

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

``sigmoid x`` computes the sigmoid function ``1 / (1 + exp (-x))`` for each element in ``x``.

Sourceval log_sum_exp' : (float, 'a) t -> float

``log_sum_exp x`` computes the logarithm of the sum of exponentials of all the elements in ``x``.

Sourceval l1norm : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``l1norm x`` calculates the l1-norm of of ``x`` along specified axis.

Sourceval l1norm' : ('a, 'b) t -> 'a

``l1norm x`` calculates the l1-norm of all the element in ``x``.

Sourceval l2norm : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``l2norm x`` calculates the l2-norm of of ``x`` along specified axis.

Sourceval l2norm' : ('a, 'b) t -> 'a

``l2norm x`` calculates the l2-norm of all the element in ``x``.

Sourceval l2norm_sqr : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``l2norm x`` calculates the square l2-norm of of ``x`` along specified axis.

Sourceval l2norm_sqr' : ('a, 'b) t -> 'a

``l2norm_sqr x`` calculates the square of l2-norm (or l2norm, Euclidean norm) of all elements in ``x``. The function uses conjugate transpose in the product, hence it always returns a float number.

Sourceval vecnorm : ?axis:int -> ?p:float -> ('a, 'b) t -> ('a, 'b) t

Refer to :doc:`owl_dense_ndarray_generic`.

Sourceval vecnorm' : ?p:float -> ('a, 'b) t -> 'a

Refer to :doc:`owl_dense_ndarray_generic`.

Sourceval max_pool : ?padding:Owl_types.padding -> (float, 'a) t -> int array -> int array -> (float, 'a) t

Refer to :doc:`owl_dense_ndarray_generic`.

Sourceval avg_pool : ?padding:Owl_types.padding -> (float, 'a) t -> int array -> int array -> (float, 'a) t

Refer to :doc:`owl_dense_ndarray_generic`.

Sourceval cumsum : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``cumsum ~axis x``, refer to the documentation in ``Owl_dense_ndarray_generic``.

Sourceval cumprod : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``cumprod ~axis x``, refer to the documentation in ``Owl_dense_ndarray_generic``.

Sourceval cummin : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``cummin ~axis x`` : performs cumulative ``min`` along ``axis`` dimension.

Sourceval cummax : ?axis:int -> ('a, 'b) t -> ('a, 'b) t

``cummax ~axis x`` : performs cumulative ``max`` along ``axis`` dimension.

Sourceval diff : ?axis:int -> ?n:int -> ('a, 'b) t -> ('a, 'b) t

``diff ~axis ~n x`` calculates the ``n``-th difference of ``x`` along the specified ``axis``.

Parameters: * ``axis``: axis to calculate the difference. The default value is the highest dimension. * ``n``: how many times to calculate the difference. The default value is 1.

Return: * The difference ndarray y. Note the shape of ``y`` 1 less than that of ``x`` along specified axis.

Sourceval angle : (Complex.t, 'a) t -> (Complex.t, 'a) t

``angle x`` calculates the phase angle of all complex numbers in ``x``.

Sourceval proj : (Complex.t, 'a) t -> (Complex.t, 'a) t

``proj x`` computes the projection on Riemann sphere of all elelments in ``x``.

Sourceval mat2gray : ?amin:'a -> ?amax:'a -> ('a, 'b) t -> ('a, 'b) t

``mat2gray ~amin ~amax x`` converts the matrix ``x`` to the intensity image. The elements in ``x`` are clipped by ``amin`` and ``amax``, and they will be between ``0.`` and ``1.`` after conversion to represents the intensity.

Sourceval lgamma : ('a, 'b) t -> ('a, 'b) t

``lgamma x`` computes the loggamma of the elements in ``x`` and returns the result in a new matrix.

Binary math operators
Sourceval add : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``add x y`` adds all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

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

``sub x y`` subtracts all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

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

``mul x y`` multiplies all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

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

``div x y`` divides all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

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

``add_scalar x a`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new matrix.

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

``sub_scalar x a`` subtracts a scalar value ``a`` from each element in ``x``, and returns the result in a new matrix.

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

``mul_scalar x a`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.

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

``div_scalar x a`` divides each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.

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

``scalar_add a x`` adds a scalar value ``a`` to each element in ``x``, and returns the result in a new matrix.

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

``scalar_sub a x`` subtracts each element in ``x`` from a scalar value ``a``, and returns the result in a new matrix.

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

``scalar_mul a x`` multiplies each element in ``x`` by a scalar value ``a``, and returns the result in a new matrix.

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

``scalar_div a x`` divides a scalar value ``a`` by each element in ``x``, and returns the result in a new matrix.

Sourceval dot : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``dot x y`` returns the matrix product of matrix ``x`` and ``y``.

Sourceval add_diag : ('a, 'b) t -> 'a -> ('a, 'b) t

``add_diag x a`` adds ``a`` to the diagonal elements in ``x``. A new copy of the data is returned.

Sourceval pow : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``pow x y`` computes ``pow(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

Sourceval scalar_pow : 'a -> ('a, 'b) t -> ('a, 'b) t

``scalar_pow a x``

Sourceval pow_scalar : ('a, 'b) t -> 'a -> ('a, 'b) t

``pow_scalar x a``

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

``atan2 x y`` computes ``atan2(a, b)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

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

``scalar_atan2 a x``

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

``scalar_atan2 x a``

Sourceval hypot : (float, 'a) t -> (float, 'a) t -> (float, 'a) t

``hypot x y`` computes ``sqrt(x*x + y*y)`` of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

Sourceval min2 : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``min2 x y`` computes the minimum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

Sourceval max2 : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``max2 x y`` computes the maximum of all the elements in ``x`` and ``y`` elementwise, and returns the result in a new matrix.

Sourceval fmod : (float, 'a) t -> (float, 'a) t -> (float, 'a) t

``fmod x y`` performs float modulus division.

Sourceval fmod_scalar : (float, 'a) t -> float -> (float, 'a) t

``fmod_scalar x a`` performs mod division between ``x`` and scalar ``a``.

Sourceval scalar_fmod : float -> (float, 'a) t -> (float, 'a) t

``scalar_fmod x a`` performs mod division between scalar ``a`` and ``x``.

Sourceval ssqr' : ('a, 'b) t -> 'a -> 'a

``ssqr x a`` computes the sum of squared differences of all the elements in ``x`` from constant ``a``. This function only computes the square of each element rather than the conjugate transpose as sqr_nrm2 does.

Sourceval ssqr_diff' : ('a, 'b) t -> ('a, 'b) t -> 'a

``ssqr_diff x y`` computes the sum of squared differences of every elements in ``x`` and its corresponding element in ``y``.

Sourceval cross_entropy' : (float, 'a) t -> (float, 'a) t -> float

``cross_entropy x y`` calculates the cross entropy between ``x`` and ``y`` using base ``e``.

Sourceval clip_by_value : ?amin:'a -> ?amax:'a -> ('a, 'b) t -> ('a, 'b) t

``clip_by_value ~amin ~amax x`` clips the elements in ``x`` based on ``amin`` and ``amax``. The elements smaller than ``amin`` will be set to ``amin``, and the elements greater than ``amax`` will be set to ``amax``.

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

``clip_by_l2norm t x`` clips the ``x`` according to the threshold set by ``t``.

Sourceval cov : ?b:('a, 'b) t -> a:('a, 'b) t -> ('a, 'b) t

``cov ~a`` calculates the covariance matrix of ``a`` wherein each row represents one observation and each column represents one random variable. ``a`` is normalised by the number of observations-1. If there is only one observation, it is normalised by ``1``.

``cov ~a ~b`` takes two matrices as inputs. The functions flatten ``a`` and ``b`` first then returns a ``2 x 2`` matrix, so two must have the same number of elements.

Sourceval kron : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``kron a b`` calculates the Kronecker product between the matrices ``a`` and ``b``. If ``a`` is an ``m x n`` matrix and ``b`` is a ``p x q`` matrix, then ``kron(a,b)`` is an ``m*p x n*q`` matrix formed by taking all possible products between the elements of ``a`` and the matrix ``b``.

Sourceval fma : ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t

``fma x y z`` calculates the `fused multiply add`, i.e. ``(x * y) + z``.

Cast functions
Sourceval cast : ('a, 'b) Owl_dense_ndarray_generic.kind -> ('c, 'd) t -> ('a, 'b) t

``cast kind x`` casts ``x`` of type ``('c, 'd) t`` to type ``('a, 'b) t`` specify by the passed in ``kind`` parameter. This function is a generalisation of the other type casting functions such as ``cast_s2d``, ``cast_c2z``, and etc.

Sourceval cast_s2d : (float, Bigarray.float32_elt) t -> (float, Bigarray.float64_elt) t

``cast_s2d x`` casts ``x`` from ``float32`` to ``float64``.

Sourceval cast_d2s : (float, Bigarray.float64_elt) t -> (float, Bigarray.float32_elt) t

``cast_d2s x`` casts ``x`` from ``float64`` to ``float32``.

``cast_c2z x`` casts ``x`` from ``complex32`` to ``complex64``.

``cast_z2c x`` casts ``x`` from ``complex64`` to ``complex32``.

``cast_s2c x`` casts ``x`` from ``float32`` to ``complex32``.

``cast_d2z x`` casts ``x`` from ``float64`` to ``complex64``.

``cast_s2z x`` casts ``x`` from ``float32`` to ``complex64``.

``cast_d2c x`` casts ``x`` from ``float64`` to ``complex32``.

In-place modification
Sourceval create_ : out:('a, 'b) t -> 'a -> unit

TODO

Sourceval uniform_ : ?a:'a -> ?b:'a -> out:('a, 'b) t -> unit

TODO

Sourceval bernoulli_ : ?p:float -> out:('a, 'b) t -> unit

TODO

Sourceval zeros_ : out:('a, 'b) t -> unit

TODO

Sourceval ones_ : out:('a, 'b) t -> unit

TODO

Sourceval one_hot_ : out:('a, 'b) t -> int -> ('a, 'b) t -> unit

TODO

Sourceval sort_ : ('a, 'b) t -> unit

``sort_ x`` performs in-place quicksort of the elelments in ``x``.

Sourceval copy_ : out:('a, 'b) t -> ('a, 'b) t -> unit

``copy_ ~out src`` copies the data from ndarray ``src`` to destination ``out``.

Sourceval reshape_ : out:('a, 'b) t -> ('a, 'b) t -> unit

TODO

Sourceval transpose_ : out:('a, 'b) t -> ?axis:int array -> ('a, 'b) t -> unit

``transpose_ ~out x`` is similar to ``transpose x`` but the output is written to ``out``.

Sourceval sum_ : out:('a, 'b) t -> axis:int -> ('a, 'b) t -> unit

TODO

Sourceval min_ : out:('a, 'b) t -> axis:int -> ('a, 'b) t -> unit

TODO

Sourceval max_ : out:('a, 'b) t -> axis:int -> ('a, 'b) t -> unit

TODO

Sourceval add_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``add_ x y`` is simiar to ``add`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval sub_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``sub_ x y`` is simiar to ``sub`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval mul_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``mul_ x y`` is simiar to ``mul`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval div_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``div_ x y`` is simiar to ``div`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval pow_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``pow_ x y`` is simiar to ``pow`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval atan2_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``atan2_ x y`` is simiar to ``atan2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval hypot_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``hypot_ x y`` is simiar to ``hypot`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval fmod_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``fmod_ x y`` is simiar to ``fmod`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval min2_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``min2_ x y`` is simiar to ``min2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval max2_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``max2_ x y`` is simiar to ``max2`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval add_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``add_scalar_ x y`` is simiar to ``add_scalar`` function but the output is written to ``x``.

Sourceval sub_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``sub_scalar_ x y`` is simiar to ``sub_scalar`` function but the output is written to ``x``.

Sourceval mul_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``mul_scalar_ x y`` is simiar to ``mul_scalar`` function but the output is written to ``x``.

Sourceval div_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``div_scalar_ x y`` is simiar to ``div_scalar`` function but the output is written to ``x``.

Sourceval pow_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``pow_scalar_ x y`` is simiar to ``pow_scalar`` function but the output is written to ``x``.

Sourceval atan2_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``atan2_scalar_ x y`` is simiar to ``atan2_scalar`` function but the output is written to ``x``.

Sourceval fmod_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``fmod_scalar_ x y`` is simiar to ``fmod_scalar`` function but the output is written to ``x``.

Sourceval scalar_add_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_add_ a x`` is simiar to ``scalar_add`` function but the output is written to ``x``.

Sourceval scalar_sub_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_sub_ a x`` is simiar to ``scalar_sub`` function but the output is written to ``x``.

Sourceval scalar_mul_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_mul_ a x`` is simiar to ``scalar_mul`` function but the output is written to ``x``.

Sourceval scalar_div_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_div_ a x`` is simiar to ``scalar_div`` function but the output is written to ``x``.

Sourceval scalar_pow_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_pow_ a x`` is simiar to ``scalar_pow`` function but the output is written to ``x``.

Sourceval scalar_atan2_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_atan2_ a x`` is simiar to ``scalar_atan2`` function but the output is written to ``x``.

Sourceval scalar_fmod_ : ?out:('a, 'b) t -> 'a -> ('a, 'b) t -> unit

``scalar_fmod_ a x`` is simiar to ``scalar_fmod`` function but the output is written to ``x``.

Sourceval fma_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``fma_ ~out x y z`` is simiar to ``fma x y z`` function but the output is written to ``out``.

Sourceval dot_ : ?transa:bool -> ?transb:bool -> ?alpha:'a -> ?beta:'a -> c:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

Refer to :doc:`owl_dense_matrix_generic`

Sourceval conj_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``conj_ x`` is similar to ``conj`` but output is written to ``x``

Sourceval abs_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``abs_ x`` is similar to ``abs`` but output is written to ``x``

Sourceval neg_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``neg_ x`` is similar to ``neg`` but output is written to ``x``

Sourceval reci_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``reci_ x`` is similar to ``reci`` but output is written to ``x``

Sourceval signum_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``signum_ x`` is similar to ``signum`` but output is written to ``x``

Sourceval sqr_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``sqr_ x`` is similar to ``sqr`` but output is written to ``x``

Sourceval sqrt_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``sqrt_ x`` is similar to ``sqrt`` but output is written to ``x``

Sourceval cbrt_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``cbrt_ x`` is similar to ``cbrt`` but output is written to ``x``

Sourceval exp_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``exp_ x`` is similar to ``exp_`` but output is written to ``x``

Sourceval exp2_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``exp2_ x`` is similar to ``exp2`` but output is written to ``x``

Sourceval exp10_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``exp2_ x`` is similar to ``exp2`` but output is written to ``x``

Sourceval expm1_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``expm1_ x`` is similar to ``expm1`` but output is written to ``x``

Sourceval log_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``log_ x`` is similar to ``log`` but output is written to ``x``

Sourceval log2_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``log2_ x`` is similar to ``log2`` but output is written to ``x``

Sourceval log10_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``log10_ x`` is similar to ``log10`` but output is written to ``x``

Sourceval log1p_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``log1p_ x`` is similar to ``log1p`` but output is written to ``x``

Sourceval sin_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``sin_ x`` is similar to ``sin`` but output is written to ``x``

Sourceval cos_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``cos_ x`` is similar to ``cos`` but output is written to ``x``

Sourceval tan_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``tan_ x`` is similar to ``tan`` but output is written to ``x``

Sourceval asin_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``asin_ x`` is similar to ``asin`` but output is written to ``x``

Sourceval acos_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``acos_ x`` is similar to ``acos`` but output is written to ``x``

Sourceval atan_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``atan_ x`` is similar to ``atan`` but output is written to ``x``

Sourceval sinh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``sinh_ x`` is similar to ``sinh`` but output is written to ``x``

Sourceval cosh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``cosh_ x`` is similar to ``cosh`` but output is written to ``x``

Sourceval tanh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``tanh_ x`` is similar to ``tanh`` but output is written to ``x``

Sourceval asinh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``asinh_ x`` is similar to ``asinh`` but output is written to ``x``

Sourceval acosh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``acosh_ x`` is similar to ``acosh`` but output is written to ``x``

Sourceval atanh_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``atanh_ x`` is similar to ``atanh`` but output is written to ``x``

Sourceval floor_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``floor_ x`` is similar to ``floor`` but output is written to ``x``

Sourceval ceil_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``ceil_ x`` is similar to ``ceil`` but output is written to ``x``

Sourceval round_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``round_ x`` is similar to ``round`` but output is written to ``x``

Sourceval trunc_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``trunc_ x`` is similar to ``trunc`` but output is written to ``x``

Sourceval fix_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``fix_ x`` is similar to ``fix`` but output is written to ``x``

Sourceval erf_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``erf_ x`` is similar to ``erf`` but output is written to ``x``

Sourceval erfc_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``erfc_ x`` is similar to ``erfc`` but output is written to ``x``

Sourceval relu_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``relu_ x`` is similar to ``relu`` but output is written to ``x``

Sourceval softplus_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``softplus_ x`` is similar to ``softplus`` but output is written to ``x``

Sourceval softsign_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``softsign_ x`` is similar to ``softsign`` but output is written to ``x``

Sourceval sigmoid_ : ?out:('a, 'b) t -> ('a, 'b) t -> unit

``sigmoid_ x`` is similar to ``sigmoid`` but output is written to ``x``

Sourceval softmax_ : ?out:('a, 'b) t -> ?axis:int -> ('a, 'b) t -> unit

``softmax_ x`` is similar to ``softmax`` but output is written to ``x``

Sourceval cumsum_ : ?out:('a, 'b) t -> ?axis:int -> ('a, 'b) t -> unit

``cumsum_ x`` is similar to ``cumsum`` but output is written to ``x``

Sourceval cumprod_ : ?out:('a, 'b) t -> ?axis:int -> ('a, 'b) t -> unit

``cumprod_ x`` is similar to ``cumprod`` but output is written to ``x``

Sourceval cummin_ : ?out:('a, 'b) t -> ?axis:int -> ('a, 'b) t -> unit

``cummin_ x`` is similar to ``cummin`` but output is written to ``x``

Sourceval cummax_ : ?out:('a, 'b) t -> ?axis:int -> ('a, 'b) t -> unit

``cummax_ x`` is similar to ``cummax`` but output is written to ``x``

Sourceval dropout_ : ?out:('a, 'b) t -> ?rate:float -> ('a, 'b) t -> unit

``dropout_ x`` is similar to ``dropout`` but output is written to ``x``

Sourceval elt_equal_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_equal_ x y`` is simiar to ``elt_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_not_equal_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_not_equal_ x y`` is simiar to ``elt_not_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_less_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_less_ x y`` is simiar to ``elt_less`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_greater_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_greater_ x y`` is simiar to ``elt_greater`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_less_equal_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_less_equal_ x y`` is simiar to ``elt_less_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_greater_equal_ : ?out:('a, 'b) t -> ('a, 'b) t -> ('a, 'b) t -> unit

``elt_greater_equal_ x y`` is simiar to ``elt_greater_equal`` function but the output is written to ``out``. You need to make sure ``out`` is big enough to hold the output result.

Sourceval elt_equal_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_equal_scalar_ x a`` is simiar to ``elt_equal_scalar`` function but the output is written to ``x``.

Sourceval elt_not_equal_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_not_equal_scalar_ x a`` is simiar to ``elt_not_equal_scalar`` function but the output is written to ``x``.

Sourceval elt_less_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_less_scalar_ x a`` is simiar to ``elt_less_scalar`` function but the output is written to ``x``.

Sourceval elt_greater_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_greater_scalar_ x a`` is simiar to ``elt_greater_scalar`` function but the output is written to ``x``.

Sourceval elt_less_equal_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_less_equal_scalar_ x a`` is simiar to ``elt_less_equal_scalar`` function but the output is written to ``x``.

Sourceval elt_greater_equal_scalar_ : ?out:('a, 'b) t -> ('a, 'b) t -> 'a -> unit

``elt_greater_equal_scalar_ x a`` is simiar to ``elt_greater_equal_scalar`` function but the output is written to ``x``.

include module type of struct include Operator end
include sig ... end
Sourceval (+$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (-$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (*$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (/$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval ($+) : 'a -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval ($-) : 'a -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval ($*) : 'a -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval ($/) : 'a -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (!=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (<>) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (>) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (<) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (>=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (<=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
include sig ... end
Sourceval (=$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (!=$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (<>$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (<$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (>$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (<=$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (>=$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (=.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (!=.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (<>.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (<.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (>.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (<=.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (>=.$) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (=~) : ?eps:float -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> bool
Sourceval (=~$) : ?eps:float -> ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> bool
Sourceval (=~.) : ?eps:float -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (=~.$) : ?eps:float -> ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (%$) : (float, 'a) Owl_dense_matrix_generic.t -> float -> (float, 'a) Owl_dense_matrix_generic.t
Sourceval ($**) : float -> (float, 'a) Owl_dense_matrix_generic.t -> (float, 'a) Owl_dense_matrix_generic.t
Sourceval (**$) : (float, 'a) Owl_dense_matrix_generic.t -> float -> (float, 'a) Owl_dense_matrix_generic.t
Sourceval (+=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
Sourceval (-=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
Sourceval (*=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
Sourceval (/=) : ('a, 'b) Owl_dense_matrix_generic.t -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
Sourceval (+$=) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> unit
Sourceval (-$=) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> unit
Sourceval (*$=) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> unit
Sourceval (/$=) : ('a, 'b) Owl_dense_matrix_generic.t -> 'a -> unit
Sourceval (.!{}<-) : ('a, 'b) Owl_dense_matrix_generic.t -> Owl_types.index list -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
Sourceval (.${}) : ('a, 'b) Owl_dense_matrix_generic.t -> int list list -> ('a, 'b) Owl_dense_matrix_generic.t
Sourceval (.${}<-) : ('a, 'b) Owl_dense_matrix_generic.t -> int list list -> ('a, 'b) Owl_dense_matrix_generic.t -> unit
include sig ... end
Sourceval (.%{}) : ('a, 'b) Owl_dense_matrix_generic.t -> int array -> 'a
Sourceval (.%{}<-) : ('a, 'b) Owl_dense_matrix_generic.t -> int array -> 'a -> unit
include sig ... end
Sourceval (**@) : ('a, 'b) Owl_linalg_generic.t -> float -> ('a, 'b) Owl_linalg_generic.t
Sourceval (/@) : ('a, 'b) Owl_linalg_generic.t -> ('a, 'b) Owl_linalg_generic.t -> ('a, 'b) Owl_linalg_generic.t
Sourceval inv : ('a, 'b) Owl_linalg_generic.t -> ('a, 'b) Owl_linalg_generic.t
Sourceval mpow : ('a, 'b) Owl_linalg_generic.t -> float -> ('a, 'b) Owl_linalg_generic.t
Sourceval lyapunov : ('a, 'b) Owl_linalg_generic.t -> ('a, 'b) Owl_linalg_generic.t -> ('a, 'b) Owl_linalg_generic.t
OCaml

Innovation. Community. Security.