tostring

ketos.utils.tostring(box, decimals=None)[source]

Convert an array, tuple or list into a string.

Args:
box: array, tuple or list

Array, tuple or list that will be converted into a string.

decimals: int

Number of decimals that will be kept in the conversion to string.

Returns:
s: str

String representation of array/tuple/list.

Example:
>>> from ketos.utils import tostring
>>> 
>>> y = [[0, 1, 2, 3],(4, 5)]
>>> print(tostring(y))
[[0,1,2,3],[4,5]]