<p dir="ltr"></p>
<p dir="ltr">--</p>
<p dir="ltr">Kind regards Nick Papior<br>
On 31 Jul 2015 17:53, "Chris Barker" <<a href="mailto:chris.barker@noaa.gov">chris.barker@noaa.gov</a>> wrote:<br>
><br>
> On Thu, Jul 30, 2015 at 11:24 PM, Jason Newton <<a href="mailto:nevion@gmail.com">nevion@gmail.com</a>> wrote:<br>
>><br>
>> 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. <br>
><br>
><br>
> well, C types are a %&$ nightmare as well! In fact, one of the biggest issues comes from cPython's use of a C "long" for an integer -- which is not clearly defined. If you are writing code that needs any kind of binary compatibility, cross platform compatibility, and particularly if you want to be abel to distribute pre-compiled binaries of extensions, etc, then you'd better use well-defined types.<br>
><br>
> numpy has had well-defined types for ages, but it is a shame that it's so easy to use the poorly-defined ones.<br>
><br>
>>  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>
><br>
> indeed.<br>
>  <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. <br>
><br>
><br>
> Sorry -- I'm not sure what C11 types are -- is "int", "long", etc, deprecated? If so, then yes.<br>
><br>
> What about Fortan -- I've been out of that loop for ages -- does semi-modern Fortran use well defined integer types?<br>
Yes, this is much like the c equivalent, integer is int, real is float, for long and double constant castings are needed. <br>
>  <br>
> Is it possible to deprecate a bunch of the built-in numpy dtypes? Without annoying the heck out everyone -- because tehre is a LOT of code out there that just uses np.float, <a href="http://np.int">np.int</a>, etc.....<br>
><br>
><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>
><br>
> yeah, that is a big concern. :-(<br>
><br>
> -Chris<br>
><br>
><br>
> -- <br>
><br>
> Christopher Barker, Ph.D.<br>
> Oceanographer<br>
><br>
> Emergency Response Division<br>
> NOAA/NOS/OR&R            (206) 526-6959   voice<br>
> 7600 Sand Point Way NE   (206) 526-6329   fax<br>
> Seattle, WA  98115       (206) 526-6317   main reception<br>
><br>
> <a href="mailto:Chris.Barker@noaa.gov">Chris.Barker@noaa.gov</a><br>
><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">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
><br>
</p>