bugGNU Octave - Bugs: bug #40578, OF linear-algebra: typo in...

 
 

bug #40578: OF linear-algebra: typo in @kronprod/iscomplex.m

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Thu 14 Nov 2013 12:28:45 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: otherOperating System: Any

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 Jump to the original submission)

Fri 15 Nov 2013 06:03:04 AM UTC, comment #7:

Yes, I ran the test suite with _run_test_suite_ in linux with only the linear-algebra package loaded.

Carnë Draug <carandraug>
Project Member
Thu 14 Nov 2013 10:08:06 PM UTC, comment #6:

jwe himself fixed it - well then we can close this bug report.

As to _run_test_suite_ : I ran it on Windows (MinGW). Did you run it on Linux?
Ah never mind, if it persists I'll file another bug report for that.

Philip Nienhuis <philipnienhuis>
Project Member
Thu 14 Nov 2013 06:38:26 PM UTC, comment #5:

No, linear-algebra has already been moved to hg. And turns out that this bug has already been fixed by jwe with cset a29567b4b299.

The fact that the test in cellfun is using the @kronprod/iscomplex may be a separate issue since it should be used only for the kronprod class. But I can't reproduce it. Even while after loading the linear-algebra package with the buggy @kronprod/iscomplex.m, _run_test_suite_ does not error with cellfun.

Carnë Draug <carandraug>
Project Member
Thu 14 Nov 2013 05:39:37 PM UTC, comment #4:

@ Carnë: is linear-algebra still in sv? If so I'll commit it. If not, I hope someone else can.

Philip Nienhuis <philipnienhuis>
Project Member
Thu 14 Nov 2013 05:37:54 PM UTC, comment #3:

I think the iscomplex() shadowing is a bit of a side-issue. _run_test_suite_.m is undocumented and I haven't checked it out yet, so perhaps it is just rong invocation by me.

As to my Octave setup:
I hit this on a plain, normal cross-built MinGW Octave (tip from yesterday evening; unfortunately hg id's aren't kept in e.g., octave_config_info and as I'm on Windows now I can't check).

No claims from me this MXE builds are perfect; but it is built using the standard mxe-octave build chain.

I know about expected shadowing behavior with overloaded classes. Doesn't seem to work as advertised in this case.

FYI,

and fntests.log says:

I suppose it is better to unload all OF packages before running tests for core Octave.

Philip Nienhuis <philipnienhuis>
Project Member
Thu 14 Nov 2013 05:23:05 PM UTC, comment #2:

Philip, can you push the change to the linear-algebra hg repo? You should have commit access to it.

Carnë Draug <carandraug>
Project Member
Thu 14 Nov 2013 02:15:54 PM UTC, comment #1:

Patch looks simple enough and correct.

This iscomplex, and any function under an @ directory, should only be called when the argument is of the matching class type.

If "which iscomplex" shows "built-in function" then I'm not sure why this function would be called from run_test_suite (any arguments to that call?). If "which iscomplex" shows path/to/linear-algebra-x.y.z/@kronprod/iscomplex.m instead, then there's a problem with how your Octave path is being set up.

Mike Miller <mtmiller>
Project Administrator
Thu 14 Nov 2013 12:28:45 PM UTC, original submission:

Patch (diff -u) attached, should be self-explaining.

On a more general note, how does this iscomplex.m differ from Octave's built-in core iscomplex.m?
From what I understand it looks like it works on class KP but I see no fall-back to the core-octave one for non-KP arguments. Which explains how I hit the bug:

I was running _run_test_suite_ in a MinGW buid and got two cellfun.c FAILs, caused by shadowing of iscomplex() by this OF-linear-algebra version of iscomplex.m

Philip Nienhuis <philipnienhuis>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29618:  iscomplex.m.diff added by philipnienhuis (380B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by philipnienhuis (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 Nov 2013 10:08:06 PM UTCphilipnienhuisStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Thu 14 Nov 2013 02:15:54 PM UTCmtmillerStatusNone=>Patch Submitted
    Thu 14 Nov 2013 12:28:45 PM UTCphilipnienhuisAttached File-=>Added iscomplex.m.diff, #29618

    Back to the top


    Powered by Savane 3.1-cleanup1