[SciPy-dev] SciPy Sprint results

Robert Kern robert.kern at gmail.com
Thu Dec 20 01:28:20 EST 2007


Charles R Harris wrote:
>     On Dec 19, 2007 12:52 PM, Travis E. Oliphant <oliphant at enthought.com
>     <mailto:oliphant at enthought.com>> wrote:

>     >   * NumPy will get a standard binary file format (.npy/.npz) for
>     > arrays/groups_of_arrays.
> 
> Will this new binary format contain endianess/type data? I am a bit
> concerned that we don't yet have a reliable way to distinguish extended
> precision floats from the coming quad precision as they  both tend to
> use 128 bytes on 64 bit machines. Perhaps extended precision should just
> be dropped at some point, especially as it is not particularly portable
> between architectures/compilers.

It uses the dtype.descr to describe the dtype of the array. You can see the
implementation here:

  http://svn.scipy.org/svn/numpy/branches/lib_for_io/format.py

If it has holes, I would like to fix them. Can you point me to some
documentation on the different quad precision formats? Doesn't IEEE-854
standardize this?

There has been some discussion about whether to continue with this format or
attempt to read and write a very tiny subset of HDF5, so don't get too attached
to the format until it hits the trunk. I'll drop some warnings into the code to
that effect.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-Dev mailing list