Handbook
Glossary
shaped+ ( a b -- c )
Vocabulary
arrays
.
shaped
Inputs
a
a
shaped-array
, a
sequence
, or a
number
b
a
shaped-array
, a
sequence
, or a
number
Outputs
c
a
shaped-array
Word description
Adds elements using trailing-axis broadcasting. Corresponding dimensions must be equal or one must be one. Returns fresh storage without modifying either input; incompatible shapes raise shape-mismatch.
Definition
USING:
arrays.shaped.private
math
;
IN:
arrays.shaped
:
shaped+
( a b -- c )
[
+
]
broadcast-binary-op
;