octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56167] pseudocode [ { [](0x1) [](0x1) [](0x1)


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #56167] pseudocode [ { [](0x1) [](0x1) [](0x1) 1 }{}, 1 ] fails, [ 1 , { [](0x1) [](0x1) 1 }{}, 1 ] works
Date: Thu, 18 Apr 2019 21:58:46 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36

Follow-up Comment #3, bug #56167 (project octave):

Sounds like an issue with the implementation/semantics of cat() or its
relatives, not the interpreter/parser.

The error message it gives here is weird: because you're doing horizontal
concatenation here, it shouldn't care about the horizontal dimensions being
consistent at all, just the vertical dimensions.

And even though the vertical dimensions are mismatched here, IIRC, empties are
usually treated as a special case, and empties of any shape are treated as [],
basically a no-op in terms of concatenation, like they are in your first
`[...]` invocation.

Code note: you could do this more concisely by just passing the shape of empty
you want to ones().


tmp{1} = 1;
tmp{2} = ones(0, 1);
tmp{3} = ones(0, 1);
tmp{4} = 1;


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56167>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]