<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 5, 2020 at 4:31 PM Juan Nunez-Iglesias <<a href="mailto:jni@fastmail.com">jni@fastmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
At the prodding [1] of Sebastian, I’m starting a discussion on the decision to deprecate np.{bool,float,int}. This deprecation broke our prerelease testing in scikit-image (which, hooray for rcs!), and resulted in a large amount of code churn to fix [2].<br>
<br>
To be honest, I do think *some* sort of deprecation is needed, because for the longest time I thought that np.float was what np.float_ actually is. I think it would be worthwhile to move to *that*, though it’s an even more invasive deprecation than the currently proposed one. Writing `x = np.zeros(5, dtype=int)` is somewhat magical, because someone with a strict typing mindset (there’s an increasing number!) might expect that this is an array of pointers to Python ints. This is why I’ve always preferred to write `dtype=<a href="http://np.int" rel="noreferrer" target="_blank">np.int</a>`, resulting in the current code churn.<br>
<br>
I don’t know what the best answer is, just sparking the discussion Sebastian wants to see. ;) For skimage we’ve already merged a fix (even if it is one of dubious quality, as Stéfan points out [3] ;), so I don’t have too much stake in the outcome.<br>
<br>
Juan.<br>
<br>
[1]: <a href="https://github.com/scikit-image/scikit-image/pull/5103#issuecomment-739334463" rel="noreferrer" target="_blank">https://github.com/scikit-image/scikit-image/pull/5103#issuecomment-739334463</a><br>
[2]: <a href="https://github.com/scikit-image/scikit-image/pull/5103" rel="noreferrer" target="_blank">https://github.com/scikit-image/scikit-image/pull/5103</a><br>
[3]: <a href="https://github.com/scikit-image/scikit-image/pull/5103#issuecomment-739368765" rel="noreferrer" target="_blank">https://github.com/scikit-image/scikit-image/pull/5103#issuecomment-739368765</a><br>
</blockquote><div><br></div><div>I checked pandas and astropy and both have several uses of the deprecated types but should be easy to fix. I suppose the question is if we want to make them fix things <i>right now</i> :)</div><div><br></div><div>Chuck </div></div></div>