numpy.strings.lower#
- strings.lower(a)[源代码]#
返回一个元素转换为小写的数组.
逐元素调用
str.lower.对于 8 位字符串,此方法与区域设置有关.
- 参数:
- a : 类数组,具有
StringDType,bytes_或str_dtype类数组,具有 输入数组.
- a : 类数组,具有
- 返回:
- outndarray
StringDType,bytes_或str_dtype 的输出数组,具体取决于输入类型
参见
示例
>>> import numpy as np >>> c = np.array(['A1B C', '1BCA', 'BCA1']); c array(['A1B C', '1BCA', 'BCA1'], dtype='<U5') >>> np.strings.lower(c) array(['a1b c', '1bca', 'bca1'], dtype='<U5')