Single/Double precision NA values
David Bateman
David.Bateman at motorola.com
Wed Jul 30 04:25:01 CDT 2008
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 David.Bateman at motorola.com
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
More information about the Octave-maintainers
mailing list