def recursively_convert_elements(element, check_type, conversion_fn):
def convert_to_numpy_identity(*args, **kwargs):
Utilities¶
recursively_convert_elements¶
-
recursively_convert_elements
(element, check_type, conversion_fn)[source]¶ Function to recursively convert all elements
- Parameters
element (Any) – the element to convert
check_type (Any) – if
element
is of typecheck_type
, the conversion function will be applied to itconversion_fn (Any) – the function to apply to
element
if it is of typecheck_type
- Returns
the converted element
- Return type
Any