MCPcopy Index your code
hub / github.com/numpy/numpy / greater

Function greater

numpy/_core/defchararray.py:199–229  ·  view source on GitHub ↗

Return (x1 > x2) element-wise. Unlike `numpy.greater`, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters ---------- x1, x2 : array_like of st

(x1, x2)

Source from the content-addressed store, hash-verified

197
198@array_function_dispatch(_binary_op_dispatcher)
199def greater(x1, x2):
200 """
201 Return (x1 > x2) element-wise.
202
203 Unlike `numpy.greater`, this comparison is performed by first
204 stripping whitespace characters from the end of the string. This
205 behavior is provided for backward-compatibility with numarray.
206
207 Parameters
208 ----------
209 x1, x2 : array_like of str or unicode
210 Input arrays of the same shape.
211
212 Returns
213 -------
214 out : ndarray
215 Output array of bools.
216
217 See Also
218 --------
219 equal, not_equal, greater_equal, less_equal, less
220
221 Examples
222 --------
223 >>> import numpy as np
224 >>> x1 = np.array(['a', 'b', 'c'])
225 >>> np.char.greater(x1, 'b')
226 array([False, False, True])
227
228 """
229 return compare_chararrays(x1, x2, '>', True)
230
231
232@array_function_dispatch(_binary_op_dispatcher)

Callers 9

__gt__Method · 0.90
test_basic_ufuncsMethod · 0.90
test_minmax_funcMethod · 0.90
__gt__Method · 0.85
masked_greaterFunction · 0.85
test_testUfuncs1Method · 0.85
test_testOddFeaturesMethod · 0.85
test_testMinMax2Method · 0.85

Calls

no outgoing calls

Tested by 6

test_basic_ufuncsMethod · 0.72
test_minmax_funcMethod · 0.72
test_testUfuncs1Method · 0.68
test_testOddFeaturesMethod · 0.68
test_testMinMax2Method · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…