numpy.char.greater_equal#
- char.greater_equal(x1, x2)[源代码]#
逐元素返回 (x1 >= x2).
与
numpy.greater_equal不同,此比较首先从字符串末尾去除空白字符.提供此行为是为了向后兼容 numarray.- 参数:
- x1, x2str 或 unicode 的类数组
具有相同形状的输入数组.
- 返回:
- outndarray
布尔值的输出数组.
参见
equal,not_equal,less_equal,greater,less
示例
>>> import numpy as np >>> x1 = np.array(['a', 'b', 'c']) >>> np.char.greater_equal(x1, 'b') array([False, True, True])