[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: logical indexing regression 3.0.1 vs 3.2.4
From: |
Olaf Till |
Subject: |
Re: logical indexing regression 3.0.1 vs 3.2.4 |
Date: |
Wed, 1 Dec 2010 23:01:17 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Dec 01, 2010 at 10:05:26AM -0800, jkirby wrote:
>
> this script returns geo = 0.62970 in 3.0.1 but "error: A(I,J,...) = X:
> dimensions mismatch" in 3.2.4 and 3.3.54+
>
> geo = [0.6297]
> c2 = [0.6562]
>
> ic2 = (c2 < 0.3)
> c = [0.8082]
> geo (1,ic2) = acos(c(ic2))
>
>
> this is on a windows build in all three cases. Anyone else see this?
Yes, in a GNU/Linux build in 3.2.4 and current tip. In current tip
(your script reduces to the first two lines):
octave:1> a = 1;
octave:2> a(1, false) = acos ([])
error: A(I,J,...) = X: dimensions mismatch
octave:2> a(1, false) = zeros (0, 0)
error: A(I,J,...) = X: dimensions mismatch
but weirdly:
octave:2> a(1, false) = []
error: A null assignment can only have one non-colon index.
octave:2> a(1, false) = zeros (1, 0)
a = 1
octave:3> a(1, false) = zeros (0, 1)
a = 1
octave:4> a(1, false)
ans = [](1x0)
octave:5>