Argument checking functions for the relax user functions.
bool
|
is_bool(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a Boolean. |
source code
|
|
bool
|
is_bool_or_bool_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
none_elements=False,
raise_error=True)
Test if the argument is a Boolean or a list of Booleans. |
source code
|
|
bool
|
is_float(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a float. |
source code
|
|
bool
|
is_float_array(arg,
name=None,
size=None,
can_be_none=False,
raise_error=True)
Test if the argument is a list or a numpy array of floats. |
source code
|
|
bool
|
is_float_matrix(arg,
name=None,
dim=None,
can_be_none=False,
none_elements=False,
raise_error=True)
Test if the argument is a matrix of floats. |
source code
|
|
bool
|
is_float_object(arg,
name=None,
dim=( 3, 3) ,
can_be_none=False,
raise_error=True)
Test if the argument is a rank-N array of floats. |
source code
|
|
bool
|
is_func(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a function. |
source code
|
|
bool
|
is_int(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is an integer. |
source code
|
|
bool
|
is_int_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
none_elements=False,
list_of_lists=False,
raise_error=True)
Test if the argument is a list of integers. |
source code
|
|
bool
|
is_int_or_int_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
none_elements=False,
raise_error=True)
Test if the argument is an integer or a list of integers. |
source code
|
|
bool
|
is_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
list_of_lists=False,
raise_error=True)
Test if the argument is a list. |
source code
|
|
bool
|
|
bool
|
is_num(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a number. |
source code
|
|
bool
|
is_num_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a list or numpy array of numbers. |
source code
|
|
bool
|
is_num_or_num_tuple(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a number or tuple of numbers. |
source code
|
|
bool
|
is_num_tuple(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a tuple of numbers. |
source code
|
|
bool
|
is_str(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a string. |
source code
|
|
bool
|
is_str_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
list_of_lists=False,
raise_error=True)
Test if the argument is a list of strings. |
source code
|
|
bool
|
is_str_or_inst(arg,
name=None,
can_be_none=False,
raise_error=True)
Test if the argument is a string or writable instance (file-like
object). |
source code
|
|
bool
|
is_str_or_num_or_str_num_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a number, a string, a list of numbers, or a
list of strings. |
source code
|
|
bool
|
is_str_or_num_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a string or a list of numbers. |
source code
|
|
bool
|
is_str_or_str_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a string or a list of strings. |
source code
|
|
bool
|
is_tuple(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a tuple. |
source code
|
|
bool
|
is_val_or_list(arg,
name=None,
size=None,
can_be_none=False,
can_be_empty=False,
raise_error=True)
Test if the argument is a value (bool, str, or number) or a list of
values. |
source code
|
|
bool
|
validate_arg(arg,
name=None,
dim=( ) ,
basic_types=[ ] ,
container_types=[ ] ,
can_be_none=False,
can_be_empty=False,
none_elements=False,
raise_error=True)
Generic validation function for any argument type. |
source code
|
|