convert string array to int array numpy code example Example: python ndarray string array into int y = y.astype(np.uint8)