On Thu, Oct 31, 2013 at 10:19 AM, Geoffrey Irving <[email protected]> wrote:
> On Thu, Oct 31, 2013 at 2:08 AM, Robert Kern <[email protected]> > wrote: > > On Thu, Oct 31, 2013 at 12:52 AM, Geoffrey Irving <[email protected]> > wrote: > >> > >> Is there a standard way in numpy of getting a char with C-native > >> integer signedness? I.e., > >> > >> boost::is_signed<char>::value ? numpy.byte : numpy.ubyte > >> > >> but without nonsensical mixing of languages? > > > > This is for interop with a C/C++ extension, right? Do this test in that > > extension's C/C++ code to expose the right dtype. As far as I know, this > is > > not something determined by the hardware, but the compiler used. Since > the > > compiler of numpy may be different from your extension, only your > extension > > can do that test properly. > > It's not determined by the hardware, but I believe it is standardized > by each platform's ABI even if it can be adjusted by the compiler. > In particular, it is unsigned on ARM. That caused a problem with the initial implementation of einsum until npy_char was changed to npy_byte (signed char) instead. <snip> Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
