Skip to content

Commit 84ee019

Browse files
committed
Docs
1 parent e770c65 commit 84ee019

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/clojure/clojure/core/matrix.cljc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,9 @@ elements not-equal to the argument are 0.
15711571
v))
15721572

15731573
(defn add
1574-
"Performs element-wise addition on one or more numerical arrays."
1574+
"Performs element-wise addition on one or more numerical arrays.
1575+
1576+
Will broadcast to the smallest shape compatible will addition of all input arrays."
15751577
([] 0.0)
15761578
([a] a)
15771579
([a b]
@@ -1600,12 +1602,15 @@ elements not-equal to the argument are 0.
16001602

16011603
(defn add-product
16021604
"Adds the element-wise product of two numerical arrays to the first array.
1603-
Arrays should be the same shape."
1605+
1606+
Arrays should be the same shape, some implementations may support broadcasting."
16041607
([m a b]
16051608
(mp/add-product m a b)))
16061609

16071610
(defn add-product!
1608-
"Adds the product of two numerical arrays to the first array. Returns the mutated array."
1611+
"Adds the product of two numerical arrays to the first array. Returns the mutated array.
1612+
1613+
Arrays should be the same shape, some implementations may support broadcasting."
16091614
([m a b]
16101615
(mp/add-product! m a b)
16111616
m))

0 commit comments

Comments
 (0)