Utilities to test whether a variable is of, or convertible to, a particular type
Checks whether a variable is convertible to a certain type. A ValueError is raised if test fails.
Parameters: | x : object
t : type
accept_none : bool
|
---|
Checks whether a sequence is convertible to a numpy ndarray with given shape, and if the elements are convertible to a certain type. A ValueError is raised if test fails.
Parameters: | x : sequence
t : type
s : sequence of ints
accept_none : bool
|
---|