octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Single/Double precision NA values


From: David Bateman
Subject: Re: Single/Double precision NA values
Date: Wed, 30 Jul 2008 11:25:01 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

John W. Eaton wrote:
On 29-Jul-2008, David Bateman wrote:

| My current patch translates the old NA values to the new internal | representation when reading files, though I can't remember if fread does | it as well. However the code writes the new NA values to the files.

It doesn't.  I looked, but I don't see a convenient place to insert
the conversion.

I've applied the patch anyway, as it seems useful to have both
NA ("single") and single (NA) work correctly.

jwe

Isn't the way to get fread to convert the NA values to just have a specialization of
t
template <class NDArray, class double>
octave_value
do_read (octave_stream& strm, octave_idx_type nr, octave_idx_type nc, octave_idx_type block_size,
    octave_idx_type skip, bool do_float_fmt_conv,
    oct_mach_info::float_forma from_flt_fmt, octave_idx_type& count)

in oct-stream.cc that performs the conversion of the old NA value to the new one? This just means copying the do_read template and adding a copy of lines at the end for the conversion. Or am I missing something?

Regards
David

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]