<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/numpy/numpy/blob/4adc87dff15a247e417d50f10cc4def8e1c17a03/numpy/__init__.pyi#L1505-L1506">numpy/numpy/__init__.pyi</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 1505 to 1506
      in
      <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/4adc87dff15a247e417d50f10cc4def8e1c17a03">4adc87d</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L1505" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1505"></td>
          <td id="LC1505" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">@<span class="pl-s1">property</span></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L1506" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="1506"></td>
          <td id="LC1506" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">__array_finalize__</span>(<span class="pl-s1">self</span>) <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>: ... </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Currently, mypy does not allow users to define <code class="notranslate">__array_finalize__</code>, since the super class (ndarray) does not have an argument. So the following error is produced:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="src/vector/_backends/numpy_.py:899: error: Signature of &quot;__array_finalize__&quot; incompatible with supertype &quot;ndarray&quot;  [override]
src/vector/_backends/numpy_.py:899: note:      Superclass:
src/vector/_backends/numpy_.py:899: note:          def __array_finalize__(self) -&gt; None
src/vector/_backends/numpy_.py:899: note:      Subclass:
src/vector/_backends/numpy_.py:899: note:          def __array_finalize__(self, obj: Any) -&gt; None"><pre class="notranslate"><code class="notranslate">src/vector/_backends/numpy_.py:899: error: Signature of "__array_finalize__" incompatible with supertype "ndarray"  [override]
src/vector/_backends/numpy_.py:899: note:      Superclass:
src/vector/_backends/numpy_.py:899: note:          def __array_finalize__(self) -&gt; None
src/vector/_backends/numpy_.py:899: note:      Subclass:
src/vector/_backends/numpy_.py:899: note:          def __array_finalize__(self, obj: Any) -&gt; None
</code></pre></div>
<p dir="auto">This type stub should have a <code class="notranslate">obj: Any</code> argument.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/melissawm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/melissawm">@melissawm</a> pointed out that <a href="https://numpy.org/devdocs/user/basics.broadcasting.html" rel="nofollow">Broadcasting</a> and <a href="https://numpy.org/devdocs/user/theory.broadcasting.html" rel="nofollow">Array Broadcasting in Numpy</a> contain a lot of duplicate content. <a href="https://numpy.org/devdocs/user/theory.broadcasting.html" rel="nofollow">Array Broadcasting in Numpy</a> is also an orphan doc(not in any TOC) and is referenced in only one other place (<code class="notranslate">Tutorial: Linear algebra on n-dimensional arrays</code>).</p>
<p dir="auto">I think we can merge the unique parts of the orphan doc into the main <code class="notranslate">Broadcasting</code> doc. The plan would be to:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add Vector quantization section and update internal links</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add SVGs in <code class="notranslate">Broadcasting</code> for examples and Vector quantization section (ref: <a href="https://github.com/numpy/numpy/issues/18501" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/18501/hovercard">Tracking Issue for Graphics</a>)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Add corresponding captions/explanations and alt-text for each figure</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Remove the corresponding images from the directory</li>
</ul>
<p dir="auto">Figures 1 and 5 from <a href="https://numpy.org/devdocs/user/theory.broadcasting.html" rel="nofollow">Array Broadcasting in Numpy</a> can be recycled and converted to SVGs, I think (please let me know what you think <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/MarsBarLee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/MarsBarLee">@MarsBarLee</a>).<br>
Figures 2, 3, 4 seem to be wrong... So I think we can make new graphics for the corresponding examples.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/melissawm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/melissawm">@melissawm</a> please let me know if you have any suggestions/corrections!</p>