该函数为数组中的每个元素调用 str.encode函数,默认编码为utf_8,可以使用标准Python库中可用的编解码器。
import numpy as np a=np.char.encode('hello', 'cp500') print a
其输出如下-
�����
该函数为数组中的每个元素调用 str.encode函数,默认编码为utf_8,可以使用标准Python库中可用的编解码器。
import numpy as np a=np.char.encode('hello', 'cp500') print a
其输出如下-
�����
暂无评论
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-20
2024-05-18
2024-05-18
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17
2024-05-17