MCPcopy Create free account
hub / github.com/numpy/numpy / greater

Function greater

numpy/core/defchararray.py:210–232  ·  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

208
209@array_function_dispatch(_binary_op_dispatcher)
210def greater(x1, x2):
211 """
212 Return (x1 > x2) element-wise.
213
214 Unlike `numpy.greater`, this comparison is performed by first
215 stripping whitespace characters from the end of the string. This
216 behavior is provided for backward-compatibility with numarray.
217
218 Parameters
219 ----------
220 x1, x2 : array_like of str or unicode
221 Input arrays of the same shape.
222
223 Returns
224 -------
225 out : ndarray
226 Output array of bools.
227
228 See Also
229 --------
230 equal, not_equal, greater_equal, less_equal, less
231 """
232 return compare_chararrays(x1, x2, '>', True)
233
234
235@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.70
masked_greaterFunction · 0.50
test_testUfuncs1Method · 0.50
test_testOddFeaturesMethod · 0.50
test_testMinMax2Method · 0.50

Calls 1

compare_chararraysFunction · 0.85

Tested by 6

test_basic_ufuncsMethod · 0.72
test_minmax_funcMethod · 0.72
test_testUfuncs1Method · 0.40
test_testOddFeaturesMethod · 0.40
test_testMinMax2Method · 0.40