bugGNU Octave - Bugs: bug #55779, ordeig fails on 1x1 matrices

 
 

bug #55779: ordeig fails on 1x1 matrices

Submitted by:  Sébastien Villemot <svillemot>
Submitted on:  Mon 25 Feb 2019 04:28:09 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Tue 26 Feb 2019 06:06:38 PM UTC, comment #7: 

Yeah, I had the same problem and didn't know how to fix it.

John W. Eaton <jwe>
Project Administrator
Tue 26 Feb 2019 04:50:11 PM UTC, comment #6: 

Indeed, that seems to be the way forward, although even that wasn't simple.

I tried

printenv | grep en_US

which returned

LANGUAGE=en_US

so I tried changing the LANGUAGE variable to en_US.utf8, en_US.UTF-8 but still got this error

abort: decoding near 'Sébastien ': 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)!

Eventually, I found using the LANG variable would work

setenv LANG en_US.utf8

You might need to pass that tip along to jwe or anyone else who has this issue.

Rik <rik5>
Project Administrator
Tue 26 Feb 2019 04:39:53 PM UTC, comment #5: 

@Rik: No problem.

For sure there must be a way to commit non-ASCII characters in commit metadata, since I have several commits in the history with the correct spelling.

Actually jwe also mangled my firstname when pushing another recent commit of mine, so maybe something has indeed changed in the way Mercurial deals with character encodings.

At least locally I have no problem creating commits with UTF8 metadata.

Maybe you just need to switch to a UTF8 locale (e.g. en_US.UTF8)?

Sébastien Villemot <svillemot>
Tue 26 Feb 2019 04:31:42 PM UTC, comment #4: 

@Sébastien: Of course, I respect people's names.  In this case, Mercurial refused to allow the changeset to be committed until I changed that character.  It was either make the change or give up on the patch altogether.  Perhaps Mercurial was less strict about file encoding in the past, or other reviewers know a way of bypassing these checks that I do not.

Rik <rik5>
Project Administrator
Tue 26 Feb 2019 09:45:44 AM UTC, comment #3: 

Thanks for improving my patch!

One minor thing: next time please don't mangle the accent in my firstname, it has semantic value.

Sébastien Villemot <svillemot>
Tue 26 Feb 2019 12:41:22 AM UTC, comment #2: 

Small typo - the first bug fix release will be 5.2.0.

Mike Miller <mtmiller>
Project Administrator
Mon 25 Feb 2019 11:05:18 PM UTC, comment #1: 

I made a few small tweaks.  Instead of returning 1, I changed isquasitri to return true when the number of rows <= 2.  I also added this bug number to the check-in message, and changed the BIST test for a 1x1 matrix to also reference this bug number.  The change went on to the stable branch and will get picked up in the first bug fix release (5.1.1).  See https://hg.savannah.gnu.org/hgweb/octave/rev/74e63d2fd0d0.

Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 25 Feb 2019 04:28:09 PM UTC, original submission:  

There is a bug in the code for ordeig that I contributed. The trivial 1x1 matrices are not handled and lead to a crash:

octave:1> ordeig(1)
error: tril: requested diagonal out of range
error: called from
    ordeig>isquasitri at line 105 column 10
    ordeig at line 50 column 7

while it should simply return 1.

The attached patch fixes the issue and adds a regression test case.

Sébastien Villemot <svillemot>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46355:  ordeig-1x1.patch added by svillemot (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by svillemot (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-25 rik5 StatusNone => Fixed
        Open/ClosedOpen => Closed
    2019-02-25 svillemot Attached File- => Added ordeig-1x1.patch, #46355

    Back to the top


    Powered by Savane 3.5