2017-03-04 38 views
0

我在想这b charcter是什么以及它出现的原因。我也想知道在打印数组时是否可以摆脱它?我可以在我的印刷声明中摆脱这个'b'字吗?

这里是我的例子:

arr1 = np.array(['1', '2'], dtype = 'c') 
print("array:", arr1, "and its dtype is: ", arr1.dtype) 

而这里的输出:

array: [b'1' b'2'] and its dtype is: |S1 

回答

相关问题