<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="520637318" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/11045" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/11045/hovercard" href="https://github.com/scipy/scipy/pull/11045">#11045</a> contained a still-extant <a href="https://github.com/scipy/scipy/blob/v1.8.0/scipy/special/_legacy.pxd#L41-L43">announcement</a> of removal of deprecated functionality by 1.7; let's do it for 1.9 at least.</p>
<p dir="auto">CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rlucas7/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rlucas7">@rlucas7</a></p>
<p dir="auto">When working on porting some <code class="notranslate">scipy.special</code> functions to CuPy, I noticed that there was a scheduled deprecation for SciPy 1.7 that has not yet been carried out. Specifically, the unsafe double-&gt;int casting for the <code class="notranslate">n</code> or <code class="notranslate">k</code> inputs to binomial distribution functions <code class="notranslate">bdtr</code>, <code class="notranslate">bdtrc</code> and <code class="notranslate">bdtri</code> leads to the following warning:</p>
<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/scipy/scipy/blob/b5d8bab88af61d61de09641243848df63380a67f/scipy/special/_legacy.pxd#L39-L43">scipy/scipy/special/_legacy.pxd</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 39 to 43
      in
      <a data-pjax="true" class="commit-tease-sha" href="/scipy/scipy/commit/b5d8bab88af61d61de09641243848df63380a67f">b5d8bab</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="L39" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="39"></td>
          <td id="LC39" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> cdef inline <span class="pl-k">void</span> _legacy_deprecation(<span class="pl-k">char</span> <span class="pl-k">*</span>func_name, <span class="pl-k">double</span> x, <span class="pl-k">double</span> y) nogil: </td>
        </tr>

        <tr class="border-0">
          <td id="L40" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="40"></td>
          <td id="LC40" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">         <span class="pl-k">with</span> gil: </td>
        </tr>

        <tr class="border-0">
          <td id="L41" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="41"></td>
          <td id="LC41" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">             PyErr_WarnEx_noerr(<span class="pl-c1">DeprecationWarning</span>, </td>
        </tr>

        <tr class="border-0">
          <td id="L42" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="42"></td>
          <td id="LC42" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                                <span class="pl-s"><span class="pl-pds">"</span>non-integer arg n is deprecated, removed in SciPy 1.7.x<span class="pl-pds">"</span></span>, </td>
        </tr>

        <tr class="border-0">
          <td id="L43" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="43"></td>
          <td id="LC43" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">                                <span class="pl-c1">1</span>) </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">I thought about making a PR to complete the deprecation, however, I am not sure how best to proceed with that as it seems inconsistent with other functions in that same file. For example the functions related to negative binomial distributions (<code class="notranslate">nbdtr</code>, <code class="notranslate">nbdtrc</code> and <code class="notranslate">nbdtri</code>) and others instead raise a <code class="notranslate">RuntimeWarning</code> and do not indicate that the unsafe casting is deprecated. Shouldn't the approach for <code class="notranslate">bdtr</code> and <code class="notranslate">nbdtr</code> be the consistent? Please advise.</p>