def arr_to_chars(arr):
 dims = list(arr.shape)
 if (not dims):
  dims = [1]
 dims.append(int(arr.dtype.str[2:]))
 arr = np.ndarray(shape=dims, dtype=arr_dtype_number(arr, 1), buffer=arr)
 empties = [(arr == '')]
 if (not np.any(empties)):
  return arr
 arr = arr.copy()
 arr[empties] = ' '
 return arr

def arr_to_chars ( arr ) : dims = list ( arr . shape ) if ( not dims ) : dims = [ 1 ] dims . append ( int ( arr . dtype . str [ 2 : ] ) ) arr = np . ndarray ( shape = dims , dtype = arr_dtype_number ( arr , 1 ) , buffer = arr ) empties = [ ( arr == '' ) ] if ( not np . any ( empties ) ) : return arr arr = arr . copy ( ) arr [ empties ] = ' ' return arr
convert string array to char array .