octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55077] automatic broadcasting for dot product


From: Carnë Draug
Subject: [Octave-bug-tracker] [bug #55077] automatic broadcasting for dot product
Date: Fri, 23 Nov 2018 06:56:39 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

URL:
  <https://savannah.gnu.org/bugs/?55077>

                 Summary: automatic broadcasting for dot product
                 Project: GNU Octave
            Submitted by: carandraug
            Submitted on: Fri 23 Nov 2018 11:56:37 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

I'm thinking it would be nice if automatic broadcasting also worked in the dot
function, so it would compute dot product between one and many vectors. Like
so:


>> a = [1; 2];
>> b = [4; 5];
>> c = [6; 7];
>> dot (a, b, 1)
ans =  14
>> dot (a, c, 1)
ans =  20
>> dot (a, [b c], 1) # currently it fails
error: dot: sizes of X and Y must match

>> dot (repmat (a, 1, 2), [b c], 1) # could work like this
ans =

   14   20

## And for this very simple case, this already works if we don't use dot at
all
>> a' * [b c]
ans =

   14   20






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55077>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]