numpy.char.greater_equal#
- char.greater_equal(x1, x2)[原始碼]#
逐元素回傳 (x1 >= x2)。
與
numpy.greater_equal
不同,此比較會先移除字串結尾的空白字元。此行為是為了向後相容於 numarray 而提供。- 參數:
- x1, x2array_like of str 或 unicode
相同形狀的輸入陣列。
- 回傳:
- outndarray
布林值的輸出陣列。
另請參閱
範例
>>> import numpy as np >>> x1 = np.array(['a', 'b', 'c']) >>> np.char.greater_equal(x1, 'b') array([False, True, True])