bugGNU Octave - Bugs: bug #43511, null array retained when cellstr...

 
 

bug #43511: null array retained when cellstr is used to build vector through concatenation

Submitted by:  None
Submitted on:  Fri 31 Oct 2014 10:02:14 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: Kelvin McColloughOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating 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)

Mon 15 Feb 2016 06:47:56 PM UTC, comment #11:

I committed the patch here.

I changed

to

because it seems that any empty matrix should be suppressed and that

It also created a failing test in copyobj.m. That seems to have been potentially unclear coding that was vulnerable to the change in definition. I fixed that too.

Rik <rik5>
Project Administrator
Mon 08 Feb 2016 06:53:04 PM UTC, comment #10:

@Lachlan
I've tested it and reported / edited the bug overview you and Avinoam made in the wiki some day ago. AFAIR it worked well.
I didn't push yet due to lack of time (testing is one thing, can be done in between, but with pushing I always try to be extra cautious)

[OT]
Did I understand well that you've been given push credentials? If so, congratulations! very well.
(and if not so, it would be about time you would get it IMO)

Philip Nienhuis <philipnienhuis>
Project Member
Tue 26 Jan 2016 04:54:49 AM UTC, comment #9:

The attached patch fixes the problem reported.

It makes constructs such as [ [], {1}; {2}, {3} ] illegal, since the rows have different numbers of elements. I assume that is the desired behaviour.

(file #36166)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Fri 20 Nov 2015 01:47:49 PM UTC, comment #8:

This also occurs in the released Octave 4.0.0

Anonymous
Thu 19 Mar 2015 10:01:13 PM UTC, comment #7:

Matlab r2015a behaves the same as r2012a.

Philip Nienhuis <philipnienhuis>
Project Member
Sat 08 Nov 2014 10:36:00 PM UTC, comment #6:

Sure, here is the result:

I've marked it as a regression :-)

Philip Nienhuis <philipnienhuis>
Project Member
Fri 07 Nov 2014 03:57:53 PM UTC, comment #5:

Well, at least the behavior seems to be generalized to concatenation with any cell.

@Philip: Could you make one more test? I don't think the first entry is special, but I want to verify that Matlab removes all null matrices wherever they appear in the list.

The following example in the development version of Octave produces:

Under Octave 3.4.3 it produces

If Matlab is the same as 3.4.3 then I think we should mark this bug as a regression.

Rik <rik5>
Project Administrator
Fri 07 Nov 2014 12:13:33 PM UTC, comment #4:

Forgot (comment #3): r2012a 32-bit

Philip Nienhuis <philipnienhuis>
Project Member
Fri 07 Nov 2014 12:13:06 PM UTC, comment #3:

Yes it does strip it out.
(I can't copy results verbatim, as my ML prerelease timed out and I ran the commands in passing while being logged in remotely at work.)

Philip Nienhuis <philipnienhuis>
Project Member
Mon 03 Nov 2014 04:28:22 AM UTC, comment #2:

I don't think there is any difference between cellstr and regular cells arrays, but could someone check the following concatenation in Matlab?

Does this also strip out the null matrix b?

Rik <rik5>
Project Administrator
Fri 31 Oct 2014 10:11:41 PM UTC, comment #1:

Matlab r2014b prerelease does (empty lines removed):

...so yes, Octave (just checked in 4.1.0+ too) behaves at least ML-incompatible.

Release => dev, OS => any, title (Summary) adapted a little

Philip Nienhuis <philipnienhuis>
Project Member
Fri 31 Oct 2014 10:02:14 PM UTC, original submission:

Version 3.4.3 and older matlab versions would return

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36166:  bug_43511.cset added by lachlan (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lachlan (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (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 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 15 Feb 2016 06:47:56 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 08 Feb 2016 04:59:01 AM UTClachlanAssigned toNone=>lachlan
    Mon 08 Feb 2016 04:51:29 AM UTClachlanStatusConfirmed=>Patch Submitted
    Tue 26 Jan 2016 04:54:49 AM UTClachlanAttached File-=>Added bug_43511.cset, #36166
    Sat 06 Dec 2014 12:35:14 AM UTCrik5Summarynull arrary retained when cellstr is used to build vector through concatenation=>null array retained when cellstr is used to build vector through concatenation
    Sat 08 Nov 2014 10:36:00 PM UTCphilipnienhuisItem GroupMatlab Compatibility=>Regression
    Fri 31 Oct 2014 10:11:41 PM UTCphilipnienhuisStatusNone=>Confirmed
      Release3.8.2=>dev
      Operating SystemGNU/Linux=>Any
      Summarynull arrary to be retained when cellstr is used to build vector through concatenation=>null arrary retained when cellstr is used to build vector through concatenation

    Back to the top


    Powered by Savane 3.1-cleanup1