diff --git a/rosidl_runtime_py/convert.py b/rosidl_runtime_py/convert.py index ac8c5c1..1a45e89 100644 --- a/rosidl_runtime_py/convert.py +++ b/rosidl_runtime_py/convert.py @@ -211,6 +211,12 @@ def _convert_value( value = '>'.format(len(value)) elif truncate_length is not None and len(value) > truncate_length: value = value[:truncate_length] + '...' + elif ( + isinstance(value, (array.array, numpy.ndarray)) + and not no_arr + and truncate_length is None + ): + value = value.tolist() elif isinstance(value, (list, tuple, array.array, numpy.ndarray)): # Since arrays and ndarrays can't contain mixed types convert to list typename = tuple if isinstance(value, tuple) else list