Mercurial > hg > octave-max
changeset 6814:8c89a644df8a
[project @ 2007-08-14 17:30:59 by jwe]
author | jwe |
---|---|
date | Tue, 14 Aug 2007 17:30:59 +0000 |
parents | 75d99621f850 |
children | fa3c21cdf3bc |
files | liboctave/ChangeLog liboctave/Sparse.cc |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -2,6 +2,7 @@ * Sparse.cc (Sparse<T>::permute): permutation vector is zero based. Simplify. + (Sparse<T>::reshape): Warn about reshaping to N-d array. 2007-08-10 Michael Goffioul <michael.goffioul@gmail.com>
--- a/liboctave/Sparse.cc +++ b/liboctave/Sparse.cc @@ -734,8 +734,12 @@ if (dims2.length () > 2) { + (*current_liboctave_warning_handler) + ("reshape: sparse reshape to N-d array smashes dims"); + for (octave_idx_type i = 2; i < dims2.length(); i++) - dims2 (1) *= dims2(i); + dims2(1) *= dims2(i); + dims2.resize (2); }