Skip to content

Commit 91010b5

Browse files
committed
Fix doc for Add, Sub
1 parent 65f51d0 commit 91010b5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/lib.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,18 +1111,18 @@ impl<A, D> Array<A, D> where
11111111
}
11121112
}
11131113

1114-
impl<'a, A, D, E> $trt<Array<A, E>> for Array<A, D> where
1115-
A: Clone + $trt<A, Output=A>,
1116-
D: Dimension,
1117-
E: Dimension,
1114+
/// Perform an elementwise arithmetic operation between **self** and **other**,
1115+
/// and return the result.
1116+
///
1117+
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1118+
///
1119+
/// **Panics** if broadcasting isn't possible.
1120+
impl<'a, A, D, E> $trt<Array<A, E>> for Array<A, D>
1121+
where A: Clone + $trt<A, Output=A>,
1122+
D: Dimension,
1123+
E: Dimension,
11181124
{
11191125
type Output = Array<A, D>;
1120-
/// Perform an elementwise arithmetic operation between **self** and **other**,
1121-
/// and return the result.
1122-
///
1123-
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1124-
///
1125-
/// **Panics** if broadcasting isn't possible.
11261126
fn $mth (mut self, other: Array<A, E>) -> Array<A, D>
11271127
{
11281128
// FIXME: Can we co-broadcast arrays here? And how?
@@ -1140,18 +1140,18 @@ impl<'a, A, D, E> $trt<Array<A, E>> for Array<A, D> where
11401140
}
11411141
}
11421142

1143-
impl<'a, A, D, E> $trt<&'a Array<A, E>> for &'a Array<A, D> where
1144-
A: Clone + $trt<A, Output=A>,
1145-
D: Dimension,
1146-
E: Dimension,
1143+
/// Perform an elementwise arithmetic operation between **self** and **other**,
1144+
/// and return the result.
1145+
///
1146+
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1147+
///
1148+
/// **Panics** if broadcasting isn't possible.
1149+
impl<'a, A, D, E> $trt<&'a Array<A, E>> for &'a Array<A, D>
1150+
where A: Clone + $trt<A, Output=A>,
1151+
D: Dimension,
1152+
E: Dimension,
11471153
{
11481154
type Output = Array<A, D>;
1149-
/// Perform an elementwise arithmetic operation between **self** and **other**,
1150-
/// and return the result.
1151-
///
1152-
/// If their shapes disagree, **other** is broadcast to the shape of **self**.
1153-
///
1154-
/// **Panics** if broadcasting isn't possible.
11551155
fn $mth (self, other: &'a Array<A, E>) -> Array<A, D>
11561156
{
11571157
// FIXME: Can we co-broadcast arrays here? And how?

0 commit comments

Comments
 (0)