I ma using python 3.8 CODE:
import numpy as np
s = 'Hello World'
a = np.frombuffer(s, dtype = 'S1')
print (a)
ERROR:
a = np.frombuffer(s, dtype = 'S1')
TypeError: a bytes-like object is required, not 'str'
I ma using python 3.8 CODE:
import numpy as np
s = 'Hello World'
a = np.frombuffer(s, dtype = 'S1')
print (a)
ERROR:
a = np.frombuffer(s, dtype = 'S1')
TypeError: a bytes-like object is required, not 'str'