Mercurial > octave-nkf
comparison src/ov-flt-re-mat.cc @ 8999:dc07bc4157b8
allow empty matrices in stream input operators
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 20 Mar 2009 11:39:25 +0100 |
parents | a48fba01e4ac |
children | fb8b8589dd46 |
comparison
equal
deleted
inserted
replaced
8998:a48fba01e4ac | 8999:dc07bc4157b8 |
---|---|
370 | 370 |
371 if (is) | 371 if (is) |
372 { | 372 { |
373 FloatNDArray tmp(dv); | 373 FloatNDArray tmp(dv); |
374 | 374 |
375 if (tmp.is_empty ()) | 375 is >> tmp; |
376 matrix = tmp; | 376 |
377 else | 377 if (is) |
378 { | 378 matrix = tmp; |
379 is >> tmp; | 379 else |
380 | 380 { |
381 if (is) | 381 error ("load: failed to load matrix constant"); |
382 matrix = tmp; | 382 success = false; |
383 else | 383 } |
384 { | |
385 error ("load: failed to load matrix constant"); | |
386 success = false; | |
387 } | |
388 } | |
389 } | 384 } |
390 else | 385 else |
391 { | 386 { |
392 error ("load: failed to read dimensions"); | 387 error ("load: failed to read dimensions"); |
393 success = false; | 388 success = false; |