NumPy char decode

NumPy char decode

In this chapter, we will discuss about NumPy char decode. This function calls numpy.char.decode() decodes the given string using the specified codec.

import numpy as np 

a = np.char.encode('hello', 'cp500') 
print a 
print np.char.decode(a,'cp500')

Its output is as follows −

�����
hello

Next Topic – Click Here

This Post Has 2 Comments

Leave a Reply