<p dir="auto">I'm not sure if this is a numpy issue or not, but the segfault occurs on a line of code</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="M = 20 * numpy.log10(M)"><pre class="notranslate"><span class="pl-v">M</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span> <span class="pl-c1">*</span> <span class="pl-s1">numpy</span>.<span class="pl-en">log10</span>(<span class="pl-v">M</span>)</pre></div>
<p dir="auto">M is a numpy ndarray with shape (927, 166) of dtype 'float64'.  The reason I'm not convinced that this is numpy's fault is that the following code works just fine:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
M = np.random.rand(927, 116)
M = 20 * np.log10(M)"><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-v">M</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">927</span>, <span class="pl-c1">116</span>)
<span class="pl-v">M</span> <span class="pl-c1">=</span> <span class="pl-c1">20</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">log10</span>(<span class="pl-v">M</span>)</pre></div>
<p dir="auto">Furthermore, I exported M to a text file, fired up a new python kernel, loaded the text file, and did the same math operation on it without issue.</p>
<p dir="auto">Looking at past discussions involving segfaults, I fired up gdb and got the following output</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Starting program: /home/ogi/miniconda3/envs/timeview/bin/python example_api_usage.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/usr/lib/libthread_db.so.1&quot;.
[New Thread 0x7ffff438d700 (LWP 490)]
[New Thread 0x7ffff3b8c700 (LWP 491)]
[New Thread 0x7fffef38b700 (LWP 492)]
[New Thread 0x7fffcd832700 (LWP 493)]
[New Thread 0x7fffccdea700 (LWP 494)]

... (my own logging for my application)

Thread 1 &quot;python&quot; received signal SIGSEGV, Segmentation fault.
0x00007ffff7de48e8 in _dl_relocate_object () from /lib64/ld-linux-x86-64.so.2"><pre class="notranslate"><code class="notranslate">Starting program: /home/ogi/miniconda3/envs/timeview/bin/python example_api_usage.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff438d700 (LWP 490)]
[New Thread 0x7ffff3b8c700 (LWP 491)]
[New Thread 0x7fffef38b700 (LWP 492)]
[New Thread 0x7fffcd832700 (LWP 493)]
[New Thread 0x7fffccdea700 (LWP 494)]

... (my own logging for my application)

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff7de48e8 in _dl_relocate_object () from /lib64/ld-linux-x86-64.so.2
</code></pre></div>
<p dir="auto">In case it helps, I'm using the conda distribution of Python (3.6.2) and Numpy 1.13.1.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
index 5d664e3..3c8b101 100755
--- a/numpy/f2py/crackfortran.py
+++ b/numpy/f2py/crackfortran.py
@@ -2606,7 +2606,7 @@ def true_intent_list(var):
     ret = []
     for intent in lst:
         try:
-            exec('c = isintent_%s(var)' % intent)
+            exec('c = isintent_%s(var)' % intent, locals())
         except NameError:
             c = 0
         if c:"><pre class="notranslate"><span class="pl-c1">diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py</span>
index 5d664e3..3c8b101 100755
<span class="pl-md">--- a/numpy/f2py/crackfortran.py</span>
<span class="pl-mi1">+++ b/numpy/f2py/crackfortran.py</span>
<span class="pl-mdr">@@ -2606,7 +2606,7 @@</span> def true_intent_list(var):
     ret = []
     for intent in lst:
         try:
<span class="pl-md"><span class="pl-md">-</span>            exec('c = isintent_%s(var)' % intent)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>            exec('c = isintent_%s(var)' % intent, locals())</span>
         except NameError:
             c = 0
         if c:</pre></div>