<p dir="auto">Hi,<br>
The following code runs without problems:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
from scipy.fftpack import rfft
rfft(np.random.random(450000))"><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-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">fftpack</span> <span class="pl-k">import</span> <span class="pl-s1">rfft</span>
<span class="pl-en">rfft</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-c1">450000</span>))</pre></div>
<p dir="auto">while this one takes forever:</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
from scipy.fftpack import rfft
rfft(np.random.random(450001))"><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-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">fftpack</span> <span class="pl-k">import</span> <span class="pl-s1">rfft</span>
<span class="pl-en">rfft</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>(<span class="pl-c1">450001</span>))</pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<p dir="auto">tested on macOS 10.14.5:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
1.2.1 1.16.2 sys.version_info(major=3, minor=7, micro=3, releaselevel='final', serial=0)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">scipy</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">scipy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version_info</span>)
<span class="pl-c1">1.2</span>.<span class="pl-c1">1</span> <span class="pl-c1">1.16</span>.<span class="pl-c1">2</span> <span class="pl-s1">sys</span>.<span class="pl-en">version_info</span>(<span class="pl-s1">major</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">minor</span><span class="pl-c1">=</span><span class="pl-c1">7</span>, <span class="pl-s1">micro</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">releaselevel</span><span class="pl-c1">=</span><span class="pl-s">'final'</span>, <span class="pl-s1">serial</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)</pre></div>
<p dir="auto">and Debian 9.9:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
0.18.1 1.12.1 sys.version_info(major=3, minor=5, micro=3, releaselevel='final', serial=0)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">sys</span>, <span class="pl-s1">scipy</span>, <span class="pl-s1">numpy</span>; <span class="pl-en">print</span>(<span class="pl-s1">scipy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">numpy</span>.<span class="pl-s1">__version__</span>, <span class="pl-s1">sys</span>.<span class="pl-s1">version_info</span>)
<span class="pl-c1">0.18</span>.<span class="pl-c1">1</span> <span class="pl-c1">1.12</span>.<span class="pl-c1">1</span> <span class="pl-s1">sys</span>.<span class="pl-en">version_info</span>(<span class="pl-s1">major</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">minor</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">micro</span><span class="pl-c1">=</span><span class="pl-c1">3</span>, <span class="pl-s1">releaselevel</span><span class="pl-c1">=</span><span class="pl-s">'final'</span>, <span class="pl-s1">serial</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)</pre></div>
<p dir="auto">FFT on len 262144 = 20m/s<br>
FFT on len 257144 = 8000m/s</p>
<p dir="auto">It actually seems quite erratic. Some will only take say 60m/s, others several hundred and if you go for an odd number I normally end up killing it after a few minutes</p>