NumPy char encode. This function calls str.encode function for each element in the array. Default encoding is utf_8, codecs available in standard Python library may be used.
import numpy as np a = np.char.encode('hello', 'cp500') print a
Its output is as follows −
�����
Next Topic – Click Here
Pingback: NumPy String Functions - Adglob Infosystem Pvt Ltd
Pingback: NumPy char decode - Adglob Infosystem Pvt Ltd ....