bugGNU Octave - Bugs: bug #34441, Weird bug with vector subtraction

 
 

bug #34441: Weird bug with vector subtraction

Submitted by:  Alexander Klein <matalex>
Submitted on:  Fri 30 Sep 2011 06:37:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidAssigned to: None
Originator Name: Alexander KleinOpen/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 30 Sep 2011 06:55:15 PM UTC, comment #1:

It's not a bug. It's a feature I implemented recently. It's equivalent to
except I haven't really documented it yet. I'm writing a chapter for the manual documenting thihs and other vectorisation features.

My inspiration is that this is turned on by default in numpy, and it's a very useful thing, plus it doesn't break Matlab backwards compatibility. Matlab code will still work unless you're counting on v - v' to error out in Matlab code. Here is the numpy document that inspired me to do this:

http://www.scipy.org/EricsBroadcastingDoc

Given this, do you really think automatic binary singleton expansion is a bad idea? It seems to work well in numpy.

I'm closing this as "not a bug", but if you think this is a bad idea, please explain why.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Fri 30 Sep 2011 06:37:02 PM UTC, original submission:

I get the following strange bug when subtracting vectors:

octave:1> [1 2 3] - [1 2 3]'
ans =

0 1 2
-1 0 1
-2 -1 0

Alexander Klein <matalex>

 

(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 jordigh (Posted a comment)
  • -unavailable- added by matalex (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
    Fri 30 Sep 2011 06:55:15 PM UTCjordighStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1