<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52964375" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/4014" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/4014/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/4014">scikit-learn/scikit-learn#4014</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam', 'spam',
    'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'eggs', 'eggs',
    'eggs', 'eggs', 'eggs', 'spam'],
    dtype='|S4')

b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam', 'spam',
    'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'spam',
    'eggs', 'spam', 'spam', 'eggs'],
    dtype='|S4')

print(a == b)
print(np.equal(a, b))"><pre class="notranslate"><code class="notranslate">a = np.array(['eggs', 'spam', 'spam', 'eggs', 'spam', 'spam', 'spam', 'spam',
    'spam', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'eggs', 'eggs',
    'eggs', 'eggs', 'eggs', 'spam'],
    dtype='|S4')

b = np.array(['eggs', 'spam', 'spam', 'eggs', 'eggs', 'spam', 'spam', 'spam',
    'spam', 'eggs', 'spam', 'eggs', 'spam', 'eggs', 'spam', 'spam',
    'eggs', 'spam', 'spam', 'eggs'],
    dtype='|S4')

print(a == b)
print(np.equal(a, b))
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ True  True  True  True False  True  True  True  True False  True  True
 False False False False  True False False False]
NotImplemented"><pre class="notranslate"><code class="notranslate">[ True  True  True  True False  True  True  True  True False  True  True
 False False False False  True False False False]
NotImplemented
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; x = np.array('abc', 'c')
&gt;&gt;&gt; x == x
array([ True,  True,  True], dtype=bool)
&gt;&gt;&gt; np.equal(x, x)
NotImplemented"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import numpy as np
&gt;&gt;&gt; x = np.array('abc', 'c')
&gt;&gt;&gt; x == x
array([ True,  True,  True], dtype=bool)
&gt;&gt;&gt; np.equal(x, x)
NotImplemented
</code></pre></div>