bugGNU Octave - Bugs: bug #56690, gui: variable editor should...


bug #56690: gui: variable editor should support display of lazy_index

Submitter:  Mike Miller <mtmiller>
Submitted:  Sun 28 Jul 2019 07:28:01 PM UTC
Category:  GUI Severity:  1 - Wish
Priority:  3 - Low Item Group:  Feature Request
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Fri 09 Sep 2022 06:10:42 AM UTC, comment #3: 

I'm coming here from bug #63025.

It seems reasonable to me to allow display of lazy index values.  Editing them already works but may convert them to matrix objects.   Something similar already happens with diagonal and permutation matrices.  For example:

[u, s, v] = svd (rand (4))
typeinfo (s)  ## returns "diagonal matrix"
openvar s
## edit an element on the diagonal
typeinfo (s)  ## still returns "diagonal matrix"
## edit an element NOT on the diagonal
typeinfo (s)  ## now returns "matrix"

If I remember correctly, this works because the variable editor is just executing indexing commands that would have the same effect if they were executed at the command line.

Also note that if you do

a = [1,2,3,4];
y = find (a > 2);
openvar y

and then change one of the elements that is displayed as "#VAL" in the variable editor so that the type of the object changes from "lazy_index" to "matrix", the array values will appear in the editor because elements of "matrix" objects can be displayed in the variable editor.

Can someone update the provided patch so that it applies to the current sources?  If not, I can try to take a look at doing that.

John W. Eaton <jwe>
Group administrator
Tue 10 Sep 2019 04:49:25 PM UTC, comment #2: 

Hi - I would like to submit a patch for this issue: please see file 'suggested_fix_for_bug_#56690.patch'. Thanks.

ImadES <ies>
Tue 20 Aug 2019 10:53:04 PM UTC, comment #1: 

A fix for this is likely to look like d2467914ce33, adding the appropriate methods to the octave_lazy_index type. This would be a good small task for a new contributor familiar with C++.

Mike Miller <mtmiller>
Group administrator
Sun 28 Jul 2019 07:28:01 PM UTC, original submission:  

The `lazy_index` type isn't handled by the variable editor, it shows `#VAL` for each element.


x = rand (10, 1);
[y, idx] = sort (x);
openvar idx

Originally reported at https://github.com/flathub/org.octave.Octave/issues/71

Mike Miller <mtmiller>
Group administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files


Depends on the following items: None found

   patch dependencies.


Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by ies (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-13 mtmiller StatusConfirmed Patch Submitted
    2019-09-13 mtmiller Dependencies- patch #9854 is dependent
    2019-09-10 ies Attached File- Added suggested_fix_for_bug_#56690.patch, #47477
    2019-08-20 mtmiller Priority5 - Normal 3 - Low
    2019-07-28 mtmiller Carbon-CopyRemoved 80942 -

    Back to the top

    Powered by Savane 3.11