擅长:python、mysql、java
<p>您可以通过更改</p>
<pre><code>if (img!=None and ref_img!=None):
</code></pre>
<p>到</p>
<pre><code>if img is not None and ref_img is not None:
</code></pre>
<p>数组有一个<code>==</code>和<code>!=</code>的实现,它返回另一个数组而不是单个布尔值。但是<code>... is not None</code>将始终计算为真或假</p>