<p dir="auto">When concatenating empty list with a list of INTEGERS result is an array of FLOATS. Since numpy 1.12 you can not use floats (result of such concatenation) for indexing without additional convertion from float to integer.</p>
<p dir="auto">Following example works in numpy &lt;=1.11 and does not work in numpy &gt;= 1.12:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array = np.arange(3)
ind0 = []
ind1 = [1]
total_ind = np.concatenate([ind0, ind1])
print array[total_ind]"><pre class="notranslate"><code class="notranslate">array = np.arange(3)
ind0 = []
ind1 = [1]
total_ind = np.concatenate([ind0, ind1])
print array[total_ind]
</code></pre></div>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/988" rel="nofollow">http://projects.scipy.org/numpy/ticket/988</a> on 2009-01-22 by trac user kelson, assigned to unknown.</em></p>
<p dir="auto">Howdy,</p>
<p dir="auto">After searching for this defect, perhaps nobody else has been bothered<br>
by this behaviour, but has anybody else noticed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="concatenate ( [[1],[2],[3],[4]] ).dtype = int32

concatenate ( [[1],[2],[3],[]] ).dtype = int32

concatenate ( [[],[2],[3],[4]] ).dtype = float64"><pre class="notranslate"><code class="notranslate">concatenate ( [[1],[2],[3],[4]] ).dtype = int32

concatenate ( [[1],[2],[3],[]] ).dtype = int32

concatenate ( [[],[2],[3],[4]] ).dtype = float64
</code></pre></div>
<p dir="auto">I have a lot of old-style Numeric stuff that likes to concatenate lists<br>
of indices which then were used with take [which does not like floats]. So<br>
below [in theory] I attach my attempt at a patch so that empty items in the sequence are<br>
not used to influence the common type that is used by PyArray_ConvertToCommonType.</p>
<p dir="auto">Maybe it is of some value, or maybe I didn't do this in a kosher manner and<br>
someone else has an idea of where things should be rethought for this defect?</p>
<p dir="auto">Cheerio.</p>