<div dir="ltr"><div><div>Been using numpy in it's various forms since like 2005.  burned on int, int_ just today with boost.python / ndarray conversions and a number of times before that.  intc being C's int!? Didn't even know it existed till today.  This isn't the first time, esp with float.  Bool is actually expected for me and I'd prefer it stay 1 byte for storage efficiency - I'll use a long if I want it machine word wide.<br><br></div>This really needs changing though.  scientific researchers don't catch this subtlety and expect it to be just like the c and matlab types they know a little about.  I can't even keep it straight in all circumstances, how can I expect them to?  This makes all the newcomers face the same pain and introduce more bugs into otherwise good code.<br><br>+1 Change it now like ripping off a bandaid.  Match C11/C++11 types and solve much pain past present and future in exchange for a few lashings for the remainder of the year.  Thankfully stdint like types have existed for quite some times so protocol descriptions have been correct most of the time.<br><br></div>-Jason<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 8:51 AM, Julian Taylor <span dir="ltr"><<a href="mailto:jtaylor.debian@googlemail.com" target="_blank">jtaylor.debian@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 07/23/2015 04:29 AM, Nathaniel Smith wrote:<br>
> Hi all,<br>
><br>
> So one of the things exposed in the numpy namespace are objects called<br>
>    <a href="http://np.int" rel="noreferrer" target="_blank">np.int</a><br>
>    np.float<br>
>    np.bool<br>
> etc.<br>
><br>
> These are commonly used -- in fact, just yesterday on another project<br>
> I saw a senior person reviewing a pull request instruct a more junior<br>
> person that they should use np.float instead of float or np.float64.<br>
> But AFAICT everyone who is actually using them is doing this based on<br>
> a very easy-to-fall-for misconception, i.e., that these objects have<br>
> something to do with numpy.<br>
<br>
I don't see the issue. They are just aliases so how is np.float worse<br>
than just float?<br>
Too me this does not seem worth the bother of deprecation.<br>
An argument could be made for deprecating creating dtypes from python<br>
builtin types as they are ambiguous (C float != python float) and<br>
platform dependent. E.g. dtype=int is just an endless source of bugs.<br>
But this is also so invasive that the deprecation would never be<br>
completed and just be a bother to everyone.<br>
<br>
So -1 from me.<br>
<br>
<br>
><br>
> P.S.: using metamodule.py also gives us the option of making<br>
> np.testing lazily imported, which last time this came up was<br>
> benchmarked to improve numpy's import speed by ~35% [1] -- not too bad<br>
> given that most production code will never touch np.testing. But this<br>
> is just a teaser postscript; I'm not proposing that we actually do<br>
> this at this time :-).<br>
><br>
> [1] <a href="http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063147.html" rel="noreferrer" target="_blank">http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063147.html</a><br>
><br>
<br>
I doubt these numbers from 2012 are still correct. When this was last<br>
profiled last year the import there were two main offenders, add_docs<br>
and np.polynomial. Both have been fixed in 1.9. I don't recall<br>
np.testing even showing up.<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br></div>