Mercurial > hg > octave-nkf
changeset 17713:ccc0576641f9
Avoid use of numel for sparse matrix when concatenating (bug #40324)
* pt-mat.cc (void tm_row_const::tm_row_const_rep::do_init_element
(const octave_value&, bool&)) : Avoid use of numel for sparse matrices
author | David Bateman <dbateman@free.fr> |
---|---|
date | Mon, 21 Oct 2013 21:58:01 +0200 |
parents | e3ac73be7894 |
children | e243a3a19831 |
files | libinterp/parse-tree/pt-mat.cc |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-mat.cc +++ b/libinterp/parse-tree/pt-mat.cc @@ -330,7 +330,8 @@ if (!any_class && val.is_object ()) any_class = true; - all_1x1 = all_1x1 && val.numel () == 1; + // Special treatment of sparse matrices to avoid out-of-memory error + all_1x1 = all_1x1 && ! val.is_sparse_type () && val.numel () == 1; } void