x is a string (in Python 3 a bytes), we can represent its data as an array of ints: >>> >>> y = np.frombuffer(x, dtype=np.int8). >>> y.data. <... at ...>.
確定! 回上一頁