bugGNU Octave - Bugs: bug #47794, Built-in function ndims() fails on...

 
 

bug #47794: Built-in function ndims() fails on 3D array

Submitted by:  None
Submitted on:  Wed 27 Apr 2016 09:16:07 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Works For MeAssigned to: None
Originator Name: barthieOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
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.

 

Thu 28 Apr 2016 08:46:34 PM UTC, comment #3:

Okay, I'm giving up: Closed for me too. Not reproducible today.

1. Compiled octave from head of hg repo (rev 21649) -> No Problem anymore.

2. Then tried again with V4.0.0 binary -> Could not be reproduced. =:o

3. Rolling back package installations needed for octave compilation -> Bug vanished.

Think I got some strange behavior due to corrupted workspace data.

Sorry for bothering. Thank you guys!

Anonymous
Thu 28 Apr 2016 12:22:23 AM UTC, comment #2:

This also works for me with 4.0.0 on Linux.

Barthie, are you sure that the code for reproduction is right? The subject line talks about a 3D array, but the code produces a 2D array. Since your comment spoke of a singleton dimension, I also tried a = reshape (a, [1 2 2]) and a = reshape (a, [2 1 2]), but both of those gave ndims(a) = 3, as expected.

Please try again to find some code that reproduces the bug. Otherwise, this will be closed as "works for me".

Lachlan Andrew <lachlan>
Project Member
Wed 27 Apr 2016 10:23:13 PM UTC, comment #1:

Works for me with the dev version (4.1.0+) on Windows:

Philip Nienhuis <philipnienhuis>
Project Member
Wed 27 Apr 2016 09:16:07 PM UTC, original submission:

Code for reproduction:

>> a=cat(3,[1 2;3 4]);
>> ndims(a)

error: A(I): index out of bounds; value 4 out of bound 3

Guess the the singleton dimension is the reason for that. However, built-in functions should handle this case properly.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 28 Apr 2016 03:23:10 AM UTCrik5StatusNone=>Works For Me
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1