<h3 dir="auto">Describe the issue:</h3>
<p dir="auto">In the context of array API spec I observed that <code class="notranslate">np.add(np.array([0]), np.array([]))</code> outputs an empty array, while <code class="notranslate">np.add(np.array([1,2]), np.array([]))</code> raises a <code class="notranslate">ValueError</code> which seems questionable.</p>
<p dir="auto">I would have expected both inputs to raise an exception.</p>
<h3 dir="auto">Reproduce the code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np

print(np.add(np.array([1]), np.array([])))  # outputs empty array

print(np.add(np.array([1, 2]), np.array([])))  # raises ValueError"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">add</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>]), <span class="pl-s1">np</span>.<span class="pl-en">array</span>([])))  <span class="pl-c"># outputs empty array</span>

<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">add</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>]), <span class="pl-s1">np</span>.<span class="pl-en">array</span>([])))  <span class="pl-c"># raises ValueError</span></pre></div>
<h3 dir="auto">Error message:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ python -c &quot;import numpy as np; print(np.add(np.array([1]), np.array([]))); print(np.add(np.array([1, 2]), np.array([])))&quot;
[]
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
ValueError: operands could not be broadcast together with shapes (2,) (0,)"><pre class="notranslate">$ python -c <span class="pl-s"><span class="pl-pds">"</span>import numpy as np; print(np.add(np.array([1]), np.array([]))); print(np.add(np.array([1, 2]), np.array([])))<span class="pl-pds">"</span></span>
[]
Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;string&gt;<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
ValueError: operands could not be broadcast together with shapes (2,) (0,)</pre></div>
<h3 dir="auto">NumPy/Python version information:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [7]: (np.__version__, sys.version)

Out[7]: ('1.21.2', '3.9.7 (default, Oct 27 2021, 01:23:21) \n[GCC 9.3.0]')"><pre class="notranslate"><code class="notranslate">In [7]: (np.__version__, sys.version)

Out[7]: ('1.21.2', '3.9.7 (default, Oct 27 2021, 01:23:21) \n[GCC 9.3.0]')
</code></pre></div>
<p dir="auto">Hello, I am not entirely sure if this is a bug or an intended feature. If the behaviour is intended I can't work out what reason it is there for.</p>
<p dir="auto">First noticed in Numpy 1.19.1 and reproduced in 1.20.1</p>
<h3 dir="auto">Reproducing code example:</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
print(np.array([0]) + [])
print(np.array([0]) + np.array([]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>]) <span class="pl-c1">+</span> [])
<span class="pl-en">print</span>(<span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0</span>]) <span class="pl-c1">+</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([]))</pre></div>
<h3 dir="auto">Output</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array([], dtype=float64)
array([], dtype=float64)"><pre class="notranslate"><code class="notranslate">array([], dtype=float64)
array([], dtype=float64)
</code></pre></div>
<h3 dir="auto">Expected behaviour</h3>
<p dir="auto">I was expecting an error like you would get if you added two arrays together of different sizes.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="numpy.array([0,0]) + numpy.array([])
numpy.array([0,0]) + []
ValueError: operands could not be broadcast together with shapes (2,) (0,)"><pre class="notranslate"><code class="notranslate">numpy.array([0,0]) + numpy.array([])
numpy.array([0,0]) + []
ValueError: operands could not be broadcast together with shapes (2,) (0,)
</code></pre></div>
<h3 dir="auto">NumPy/Python version information:</h3>
<p dir="auto">1.20.1 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]</p>