package owl-base

  1. Overview
  2. Docs
OCaml Scientific and Engineering Computing - Base

Install

Dune Dependency

Authors

Maintainers

Sources

0.6.0.tar.gz
md5=b78de667bc02e232beb321e0d7e11347
sha512=0bb8dbeef6f762660f1bf5eaf9e4b96a9af3956fadf15a8000f99d9a676a0b6e32870d29d74bc4a87eab6967cc27ecfca82d42b9d9e682b1937dc15121f8f298

doc/owl-base/Owl_exception/index.html

Module Owl_exceptionSource

Core function
Sourceval check : bool -> exn -> unit

``check p e`` raises the exception ``e`` if the predicate ``p`` is ``false``, otherwise returns ``unit``.

Parameters: * ``p``: predicate to check. * ``e``: exception to raise.

Returns: * ``unit``

Sourceval verify : bool -> (unit -> exn) -> unit

``verify p f`` calls the function ``f`` which further raises an exception if the predicate ``p`` is ``false``, otherwise returns ``unit``.

Parameters: * ``p``: predicate to check. * ``f``: function to raise the exception.

Returns: * ``unit``

Sourceval to_string : exn -> string

``to_string e`` converts an exception into a string containing more detailed information for debugging the code.

Sourceval pp_exception : Format.formatter -> exn -> unit

``pp_exception`` is the pretty printer for Owl exceptions.

Exception definition
Sourceexception CONV_INVALID_ARGUMENT

Input arugments of convolution operations are invalid.

Sourceexception NOT_IMPLEMENTED of string

Exception of not implemented yet.

Sourceexception NOT_SUPPORTED

Exception of not supported type.

Sourceexception FOUND

Exception of found an element.

Sourceexception NOT_FOUND

Exception of not found an element.

Sourceexception EMPTY_ARRAY

Exception of an empty array

Sourceexception TEST_FAIL

Unit Test fails.

Sourceexception INVALID_ARGUMENT of string

Input arugments are invalid.

Sourceexception INVALID_PROBABILITY of float

Invalide probability value, not within 0,1 range.

Sourceexception LINALG_MATRIX_DOT_SHAPE of int * int * int * int

Invalid matrix shapes for matrix dot product.

Sourceexception NON_NEGATIVE_INT of int

Fails if the input is negative.

Sourceexception NOT_SQUARE of int array

Fails if a matrix is not square.

Sourceexception NOT_MATRIX of int array

Fails if the input is not a matrix.

Sourceexception DIFFERENT_SHAPE of int array * int array

Fail if two ndarrays have different shape.

Sourceexception DIFFERENT_SIZE of int * int

Fail if two ndarrays have different size.

Sourceexception NOT_BROADCASTABLE

Fail if the shapes of multiple ndarrays are not broadcastable.

Sourceexception NOT_CONVERGE

Fail to converge.

Sourceexception MAX_ITERATION

Number of iteration exceeds the threshold.

Sourceexception SINGULAR

Exception of singular matrix.

Sourceexception NOT_SIMPLEX

Exception of not being simplex.

Sourceexception INDEX_OUT_OF_BOUND

Exception of index out of boundary.

Sourceexception ZOO_ILLEGAL_GIST_NAME

Exception of illegal gist name.

OCaml

Innovation. Community. Security.