chevron_left
Char
Method addMethod capitalizeMethod centerMethod countMethod endswithMethod equalMethod expandtabsMethod findMethod greaterMethod greater_equalMethod indexMethod isalnumMethod isalphaMethod isdecimalMethod isdigitMethod isnumericMethod isupperMethod joinMethod lessMethod less_equalMethod ljustMethod lowerMethod multiplyMethod not_equalMethod rfindMethod rjustMethod rstripMethod splitMethod splitlinesMethod startswithMethod upperMethod zfill
0
0
0
new
NumPy char | not_equal method
Programming
chevron_rightPython
chevron_rightNumPy
chevron_rightDocumentation
chevron_rightChar
schedule Mar 9, 2022
Last updated Python●NumPy
Tags tocTable of Contents
expand_more NumPy's np.char.not_equal(~)
method takes as input two arrays of strings, and then performs a pair-wise not-equal comparison to output a NumPy array of booleans.
Parameters
1. x1
| array-like
The first input array.
2. x2
| array-like
The second input array.
Return Value
A NumPy array of booleans.
Examples
np.char.not_equal(["a", "d", "e"], ["b", "c", "e"])
array([ True, True, False])
Here, we are performing the following comparisons:
"a"
!="b"
(True)"d"
!="c"
(True)"e"
!="e"
(False)
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...