bugGNU Octave - Bugs: bug #29630, reshape of logical scalar return...

 
 

bug #29630: reshape of logical scalar return double value

Submitted by:  None
Submitted on:  Wed 21 Apr 2010 04:07:29 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jaroslav Hajek <highegg>
Originator Name: Alois SchlöglOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 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.

 

Fri 23 Apr 2010 09:44:08 AM UTC, comment #1:

Fixed by
http://hg.savannah.gnu.org/hgweb/octave/rev/ffe28cdc6fe2

thanks

Jaroslav Hajek <highegg>In charge of this item.
Wed 21 Apr 2010 04:07:29 PM UTC, original submission:

Reshaping a logical scalar returns a double value.

This causes strange effects when A is in general a logical matrix, but can degrade to a matrix of size 1x1.

The issue can reproduced by

A=logical(1);
class(reshape(A,[1,numel(A)]))

ans = double

The answer is incorrect as one would expect

ans = logical

Alois

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 highegg (Updated the item)
  • -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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Apr 2010 09:44:08 AM UTChigheggStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 23 Apr 2010 08:04:53 AM UTChigheggStatusNone=>Confirmed
      Assigned toNone=>highegg

    Back to the top


    Powered by Savane 3.1-cleanup1