octave-maintainers
[Top][All Lists]
Advanced

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

Re: Removing broadcasting from Octave


From: John W. Eaton
Subject: Re: Removing broadcasting from Octave
Date: Thu, 15 Dec 2011 10:56:45 -0500

On 15-Dec-2011, Judd Storrs wrote:

| If you sat down to describe this to anyone you would never use the
| word "broadcast". It's quite a boring and confusing phrase for an
| exciting feature.

I have no problem with the term.  It sure beats bsxfun.

| "Broadcast" to me (and probably anyone) conjures a sense of
| communication or signaling not duplication. It's a really unexpected
| use. I can't imagine telling anyone about this feature and using the
| word "broadcast" without also having to redefine their understanding
| of the word "broadcast". This should be a key feature to lord over
| Matlab users, but this phrasing is just suicide.

That seems a bit dramatic.

How about the following as a NEWS file entry?

  Many of Octave's binary operators (.*, .^, +, -, ...) now perform
  automatic broadcasting for array operations that allows you to use
  operator notation instead of calling bsxfun or expanding arrays (and
  unnecessarily wasting memory) with repmat or similar idioms.  For
  example, to scale the columns of a matrix by the elements of a row
  vector, you may now write

    r .* M

  In this expression, the number of elements of r must match the
  number of columns of M.  The following operators are affected:

    plus      ldivide   rem    eq    gt     xor
    minus     power     mod    ne    ge
    times     max       atan2  lt    and
    rdivide   min       hypot  le    or

    +         .*        &
    -         ./        |
    .+        .\
    .-        .^

    +=        .*=       &=
    -=        ./=       |=
    .+=       .\=
    .-=       .^=

  See the new "Broadcasting Operations" chapter in the manual for more
  details.

I don't think there's any need to mention numpy in the news entry.
Now we just need the new chapter for the manual that describes this
new feature in more detail.

jwe


reply via email to

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