Mercurial > hg > octave-terminal
changeset 11757:61f955d848c3 release-3-0-x
octave_stream::read: allow single data type specification but return double
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 20 Apr 2008 09:04:47 -0400 |
parents | d68fc0ca4ece |
children | 7cc783e52ddb |
files | src/ChangeLog src/oct-stream.cc |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-04-20 John W. Eaton <jwe@octave.org> + + * oct-stream.cc (octave_stream::read): Allow single data type + specification but return double. + 2008-04-18 John W. Eaton <jwe@octave.org> * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -3252,6 +3252,10 @@ FILL_TABLE_ROW (oct_data_conv::dt_uint32, uint32NDArray); FILL_TABLE_ROW (oct_data_conv::dt_int64, int64NDArray); FILL_TABLE_ROW (oct_data_conv::dt_uint64, uint64NDArray); + // FIXME -- the following line allows things like int8=>single + // to work, but they will actually return a double value. We + // need a floatNDArray for this to work properly. + FILL_TABLE_ROW (oct_data_conv::dt_single, NDArray); FILL_TABLE_ROW (oct_data_conv::dt_double, NDArray); FILL_TABLE_ROW (oct_data_conv::dt_char, charNDArray); FILL_TABLE_ROW (oct_data_conv::dt_schar, charNDArray);