package owl-base

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

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 arguments 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 arguments are invalid.

Sourceexception INVALID_PROBABILITY of float

Invalid 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.