From bug-octave-request at bevo dot che dot wisc dot edu Wed Jan 21 15:48:58 2004 Subject: ND Array assignment causes octave crash From: "John W. Eaton" To: Quentin Spencer Cc: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 21 Jan 2004 15:47:05 -0600 On 20-Dec-2003, Quentin Spencer wrote: | Bug report for Octave 2.1.52 configured for i686-pc-linux-gnu | | Description: | ----------- | | Assignments of the form x(1,1,:)=y, where y is a 1-by-1-by-N | array cause octave to crash. | | Repeat-By: | --------- | | octave 1> a(1,1,:)=ones(1,1,3) | error: invalid converstion of NDArray to Matrix | octave: dim-vector.h:104: int& dim_vector::dim_vector_rep::elem(int): | Assertion `i >= 0 && i < ndims' failed. | panic: Aborted -- stopping myself... | attempting to save variables to `octave-core'... | save to `octave-core' complete | Aborted I think this problem is fixed in the CVS sources now: octave:1> a(1,1,:) = ones (1, 1, 3) a = ans(:,:,1) = 1 ans(:,:,2) = 1 ans(:,:,3) = 1 Thanks, jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------