bugGNU Octave - Bugs: bug #41633, postpad and prepad fail when...

 
 

bug #41633: postpad and prepad fail when padding singleton dimensions

Submitter:  CarnĂ« Draug <carandraug>
Submitted:  Tue 18 Feb 2014 06:27:26 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 21 Feb 2014 11:14:45 PM UTC, comment #2: 

I've pushed this fix to gui-release since it's fairly simple. The full test suite passes, looks okay to me.

http://hg.savannah.gnu.org/hgweb/octave/rev/d28c4c4547ef

Mike Miller <mtmiller>
Group Member
Fri 21 Feb 2014 05:15:12 AM UTC, comment #1: 

I've got a patch for this, attached. As far as I can tell this doesn't break existing functionality at all, only allows arguments that would have been errors previously. So I think this could go on the gui-release branch for 4.0.

Also, workaround is to use cat directly which does allow dimensions larger than current. For your example,


a = rand (4, 4);
cat (3, a, zeros ([size(a) 2]))


gives the padding you're looking for.

(file #30628)

Mike Miller <mtmiller>
Group Member
Tue 18 Feb 2014 06:27:26 PM UTC, original submission:  

Example:


> a = rand(4, 4);
> postpad (a, 3, 0, 3)
error: postpad: DIM must be an integer and a valid dimension


I would expect this to expand to the 3rd dimension to length 3.

Carnë Draug <carandraug>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30628:  bug41633.diff added by mtmiller (3KiB - 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 mtmiller (Updated the item)
  • -email is unavailable- added by carandraug (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-21 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2014-02-21 mtmiller Attached File- Added bug41633.diff, #30628
        CategoryNone Octave Function
        StatusNone Patch Submitted
        Summarypostpad fails when padding singleton dimensions postpad and prepad fail when padding singleton dimensions

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code