Mercurial > octave
changeset 23987:4d5018136313
Skip writing N-D matrix to -ascii format, rather than calling error().
* ls-mat-ascii.cc (save_mat_ascii_data): For an N-D array, issue a warning
about skipping variable and then return from function without writing any data.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 31 Aug 2017 17:03:27 -0700 |
parents | 8db08d3f4822 |
children | bdde51fda657 |
files | libinterp/corefcn/ls-mat-ascii.cc |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/ls-mat-ascii.cc Thu Aug 31 16:54:32 2017 -0700 +++ b/libinterp/corefcn/ls-mat-ascii.cc Thu Aug 31 17:03:27 2017 -0700 @@ -346,7 +346,10 @@ warning ("save: omitting imaginary part for ASCII file"); if (val.ndims () > 2) - error ("save: only 2-D matrices can be saved to ASCII file"); + { + warning ("save: skipping variable which is not a 2-D matrix"); + return true; + } Matrix m;