[bug #55077] automatic broadcasting for dot product

Andreas Bertsatos <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #2, bug #55077 (group octave):

As of Octave 11, broadcasting has been extended to support all types of octave
arrays.

Array broadcasting follows the simple rule that "Two arrays are compatible if,
for each dimension, the sizes are either the same or one of them is 1". Array
broadcasting is applied to all binary operations (including basic math,
comparison, and boolean ops).

On the other hand, all regular functions (such as *dot*) that take multiple
arguments and require size compatibility among these arguments follow a
different rule that inputs have to be of common size or scalars. This is why
Octave also has the *common_size* function which is extensively being used by
other core functions and packages (eg statistics).

Although tempting to apply full broadcasting rules to regular functions, it is
not a good idea because it kind of opens Pandora's box in terms of
compatibility and most importantly consistency across Octave functions. If we
update *dot* to support full broadcasting rules, then we should do this to
numerous other functions as well (eg power). This is not only a huge task, but
it will introduce an unwanted complexity in all the functions affected.

IMHO we should keep broadcasting the way it is currently distinguished between
binary ops and functions. This report should be marked as won't fix!


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZGzswAKCRCqLAuaBUf3
TlZUAP0XrwFc8Hk2up6p1Y3uLsLBhxJjDHU1nfcC35H6zcaI4QEAgqi5lyPvhaRA
ch5KuhU/kUGgtltA3xqWD/Kv+W0s7A8=
=+Fjv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.