<p dir="auto">Sorry in advance if this is a duplicate. As of numpy 1.12.1,  an error is raised by genfromtxt() when using <code class="notranslate">names=True</code> with <code class="notranslate">comments=None</code>. Tested with:</p>
<ul dir="auto">
<li>Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19)</li>
<li>numpy 1.12.1</li>
<li>Linux rsiverd-linux.lco.gtn 3.10.0-693.5.2.el7.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="317838" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/1/hovercard" href="https://github.com/numpy/numpy/pull/1">#1</a> SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</li>
</ul>
<p dir="auto">...............................................................................................................</p>
<p dir="auto"><strong>Instructions to reproduce</strong> (using attached sample file 'asdf.txt'):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="data = np.genfromtxt('asdf.txt', dtype=None, comments=None, delimiter='|', names=True)"><pre class="notranslate"><code class="notranslate">data = np.genfromtxt('asdf.txt', dtype=None, comments=None, delimiter='|', names=True)
</code></pre></div>
<p dir="auto"><a href="https://github.com/numpy/numpy/files/1835574/asdf.txt">asdf.txt</a><br>
...............................................................................................................<br>
<strong>Expected result</strong>:</p>
<ul dir="auto">
<li>Successful loading of the data file (no error).</li>
</ul>
<p dir="auto">...............................................................................................................<br>
<strong>Actual result</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError                                 Traceback (most recent call last)
&lt;ipython-input-1-1d47ac60e22b&gt; in &lt;module&gt;()
----&gt; 1 data = np.genfromtxt('asdf.txt', dtype=None, comments=None, delimiter='|', names=True)

/home/rsiverd/anaconda2/lib/python2.7/site-packages/numpy/lib/npyio.pyc in genfromtxt(fname, dtype, comments, delimiter, skip_header, skip_footer, converters, missing_values, filling_values, usecols, names, excludelist, deletechars, replace_space, autostrip, case_sensitive, defaultfmt, unpack, usemask, loose, invalid_raise, max_rows)
   1536             first_line = next(fhd)
   1537             if names is True:
-&gt; 1538                 if comments in first_line:
   1539                     first_line = (
   1540                         asbytes('').join(first_line.split(comments)[1:]))

TypeError: 'in &lt;string&gt;' requires string as left operand, not NoneType"><pre class="notranslate"><code class="notranslate">TypeError                                 Traceback (most recent call last)
&lt;ipython-input-1-1d47ac60e22b&gt; in &lt;module&gt;()
----&gt; 1 data = np.genfromtxt('asdf.txt', dtype=None, comments=None, delimiter='|', names=True)

/home/rsiverd/anaconda2/lib/python2.7/site-packages/numpy/lib/npyio.pyc in genfromtxt(fname, dtype, comments, delimiter, skip_header, skip_footer, converters, missing_values, filling_values, usecols, names, excludelist, deletechars, replace_space, autostrip, case_sensitive, defaultfmt, unpack, usemask, loose, invalid_raise, max_rows)
   1536             first_line = next(fhd)
   1537             if names is True:
-&gt; 1538                 if comments in first_line:
   1539                     first_line = (
   1540                         asbytes('').join(first_line.split(comments)[1:]))

TypeError: 'in &lt;string&gt;' requires string as left operand, not NoneType
</code></pre></div>
<p dir="auto">...............................................................................................................<br>
<strong>Suggested remedy:</strong></p>
<p dir="auto">It looks like the check for the first valid values does not check whether <code class="notranslate">comments is None</code> before looking for the comment string in the first line, raising this error. I suspect this is easily fixed by replacing</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        while not first_values:
            first_line = next(fhd)
            if names is True:
                if comments in first_line:
                    first_line = (
                        asbytes('').join(first_line.split(comments)[1:]))
            first_values = split_line(first_line)"><pre class="notranslate"><code class="notranslate">        while not first_values:
            first_line = next(fhd)
            if names is True:
                if comments in first_line:
                    first_line = (
                        asbytes('').join(first_line.split(comments)[1:]))
            first_values = split_line(first_line)
</code></pre></div>
<p dir="auto">with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="        while not first_values:
            first_line = next(fhd)
            if (names is True) and (comments is not None):
                if comments in first_line:
                    first_line = (
                        asbytes('').join(first_line.split(comments)[1:]))
            first_values = split_line(first_line)"><pre class="notranslate"><code class="notranslate">        while not first_values:
            first_line = next(fhd)
            if (names is True) and (comments is not None):
                if comments in first_line:
                    first_line = (
                        asbytes('').join(first_line.split(comments)[1:]))
            first_values = split_line(first_line)
</code></pre></div>
<h2 dir="auto">Documentation</h2>
<p dir="auto">Now that <a href="https://numpy.org/numpy-tutorials/" rel="nofollow">https://numpy.org/numpy-tutorials/</a> is deployed, we need to decide how to organize our internal documentation.</p>
<p dir="auto">Currently, <a href="https://numpy.org/devdocs/user/tutorials_index.html" rel="nofollow">this page</a> is also called NumPy Tutorials. The two tutorials listed there are also available as Jupyter Notebooks from the <a href="https://github.com/numpy/numpy-tutorials">separate numpy-tutorials repo</a>.</p>
<p dir="auto">In our docs team meetings, we have discussed two possibilities:</p>
<ol dir="auto">
<li>Keeping two sets of tutorials. This would allow us to separate the contents into in-depth guides about NumPy features (in the main sphinx docs) and general tutorials with applications of NumPy in other domains (in the numpy-tutorials repo). In this case, the tutorials section in the main docs would have to be renamed; one suggestion is "NumPy Guides" or similar.</li>
<li>Only keeping the numpy-tutorials repo, making the sphinx tutorials page point to the rendered numpy-tutorials site and adding any new content there.</li>
</ol>
<p dir="auto">It would be nice to have further input from the community so we can reach a solution. If you have other ideas, please feel free to let us know!</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rossbar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rossbar">@rossbar</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rgommers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rgommers">@rgommers</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cooperrc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cooperrc">@cooperrc</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/8bitmp3/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/8bitmp3">@8bitmp3</a></p>