<br><br><div class="gmail_quote">On Tue, Oct 30, 2012 at 4:08 PM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br><br>Ticket 2228 says ABI was broken in 1.6.x. Specifically, NPY_CHAR in the NPY_TYPES enum seems to be have been moved. Can anyone comment on why the 3 datetime related values were inserted instead of appended?<span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote><div><br>I don't know, although having NPY_CHAR after  NPY_NTYPES goes back to 1.0.3<br><span style="font-family:courier new,monospace"><font><br></font></span><pre><div class="line" id="LC124">
<span style="font-family:courier new,monospace"><font>              <span class="n">      NPY_NTYPES</span><span class="p">,</span></font></span></div><div class="line" id="LC125"><span style="font-family:courier new,monospace"><font>                    <span class="n">NPY_NOTYPE</span><span class="p">,</span></font></span></div>
<div class="line" id="LC126"><span style="font-family:courier new,monospace"><font>                    <span class="n">NPY_CHAR</span><span class="p">,</span>      <span class="cm">/* special flag */</span></font></span></div>
</pre>And I expect it was desired to keep it there on the expectation that there was a reason for it. The decision not to append was in 1.4.0<br><span style="font-family:courier new,monospace"><font><br>                    NPY_DATETIME, NPY_TIMEDELTA,<br>
                    NPY_NTYPES,<br>                    NPY_NOTYPE,</font></span><span style="font-family:courier new,monospace"><font><br><font>                    </font><span class="n">NPY_CHAR</span><span class="p">,</span>      <span class="cm">/* special flag */</span></font></span><br>
<br>And probably due to Robert Kern or Travis, IIRC who worked on getting it in.<br><br>I don't see a good way to get around the ABI break, I think the question going forward needs to be whether we leave it after NPY_NTYPES or make it part of the unchanging ABI, and I suspect we need to know what the 'special flag' comment means before we can make that decision. My suspicion is that it wasn't considered a real numeric type, but rather a flag marking a special string type, in which case it probably doesn't really belong among the types, which I think is also indicated by NPY_NOTYPE. Moving NPY_CHAR could have implications we would want to check, but I'd generally favor moving it all else being equal.<br>
<br>Chuck <br></div></div>