[Numpy-discussion] Questions about the array interface.

Scott Gilbert xscottg at yahoo.com
Fri Apr 8 14:43:02 EDT 2005

--- Andrew Straw <strawman at astraw.com> wrote:
> >
> > This behavior is explained by Tim Peters:
> >
> >
> >
> I feared it was something like that. (No platform independent way to 
> represent special values like nan, inf, and so on.)  So I think if we're 
> going to require an encoding character such as '<' or '>' we should also 
> include one that means native which CAN handle these special values... 
> And document why it's needed and why it may get one into trouble.

The data is either big endian or little endian (or possibly a single byte
in which case it doesn't matter).  Whether or not the (hardware, operating
system, C runtime library, C compiler, or Python implementation) can handle
NaNs or Infs is not a property of the data.

What does an additional code or two get you?  Let's say we used ']' for big
endian native, and '[' for little endian native?  Does that just indicate
the possible presence of NaNs for Infs in the data?

Adding those codes doesn't have any affect on whether or not libraries can
deal with them.  I guess I'm not understanding something.


More information about the NumPy-Discussion mailing list