np_string_prefix#
- torch_brain.utils.np_string_prefix(prefix, array)[source]#
Adds a string prefix to each element of a numpy string array.
- Parameters:
prefix (str) – The string to prepend to each element.
array (np.ndarray) – An array of strings or string-like objects.
- Returns:
New array with the prefix added to each element.
- Return type:
np.ndarray