[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42061] dot() fails to diagnose non-conformabl
From: |
Glenn Golden |
Subject: |
[Octave-bug-tracker] [bug #42061] dot() fails to diagnose non-conformable arguments |
Date: |
Sun, 06 Apr 2014 21:25:23 +0000 |
User-agent: |
Opera/9.80 (X11; Linux i686) Presto/2.12.388 Version/12.16 |
URL:
<http://savannah.gnu.org/bugs/?42061>
Summary: dot() fails to diagnose non-conformable arguments
Project: GNU Octave
Submitted by: grepfor
Submitted on: Sun 06 Apr 2014 09:25:22 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Glenn Golden
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.0
Operating System: GNU/Linux
_______________________________________________________
Details:
The dot() function fails to complain if the operands are non-conformable(!).
x = [1 2 3];
y = [4 5];
dot(x,y)
ans = 14
This seems pretty gross, and one must ask (without meaning any disrespect):
How in the world could a bug like this have escaped testing? Can it actually
be considered correct operation in some sense?
The doc claims that dot(x,y) is supposed to be equivalent to
sum(conj(x).*y, DIM)
which makes sense, but clearly this cannot be the case when x and y are
non-conformable. Based on the results obtained, the behavior seems like the
shorter operand is being extended with zeros to the length of the longer one.
Can this actually be intended in some sense?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42061>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42061] dot() fails to diagnose non-conformable arguments,
Glenn Golden <=