[bug #55077] automatic broadcasting for dot product

Rik <[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 #3, bug #55077 (group octave):

Matlab says this about binary operators:

Most binary (two-input) operators and functions in MATLAB® support numeric
arrays that have compatible sizes. 

The list of functions that Matlab has chosen to implement broadcasting is

Function	Symbol	Description
plus	+ Plus
minus	- Minus
times	.* Array multiply
rdivide	./ Right array divide
ldivide	.\ Left array divide
power	.^ Array power
eq	== Equal
ne	~= Not equal
gt	> Greater than
ge	>= Greater than or equal to
lt	< Less than
le	<= Less than or equal to
and	& Element-wise logical AND
or	| Element-wise logical OR
xor	N/A Logical exclusive OR
bitand	N/A Bit-wise AND
bitor	N/A Bit-wise OR
bitxor	N/A Bit-wise XOR
max	N/A Binary maximum
min	N/A Binary minimum
mod	N/A Modulus after division
rem	N/A Remainder after division
atan2	N/A Four-quadrant inverse tangent; result in radians
atan2d	N/A Four-quadrant inverse tangent; result in degrees
hypot	N/A Square root of sum of squares


Note that some of these are functions of 2-arguments, not just operators.  So,
*rem* does broadcasting.

The function *dot* seems similar to me.  For example, one might have a matrix
where each column is really a vector and one would like to take the dot
product of all of the vectors with a different one.

I don't have a strong feeling though about adding or not adding broadcasting
for the *dot* function.



    _______________________________________________________

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-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZHwsgAKCRCqLAuaBUf3
TmBFAQDZvZxdX0i1XyKpsE5wNbtWU/Xnl3V+3VieUWrwC90m3gD/VVKjVA22Sv5q
tGqJGUmpoNnETP1SiOPl8t0JPjiVcQo=
=00V4
-----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.