returnn.datasets.util.strings#

Operations on strings.

returnn.datasets.util.strings.str_to_numpy_array(s: str) ndarray[source]#

Canonical way to make a Numpy array for a Python string.

For returnn.tensor.Tensor instances on Numpy arrays, the dtype logic assumes this behavior.

Parameters:

s ā€“ string

Returns:

numpy array, dtype.kind == ā€œUā€