Skip to content

Commit 21972e7

Browse files
committed
Fixed example code in join_many macro documentation
1 parent c3f7921 commit 21972e7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/macros.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,17 @@ macro_rules! mem_info {
6060

6161
/// Join multiple Arrays along a given dimension
6262
///
63+
/// All the Arrays provided to this macro should be of type `&Array`
64+
///
6365
/// # Examples
6466
///
6567
/// ```
6668
/// # #[macro_use] extern crate arrayfire;
6769
/// # fn main() {
68-
/// let a = randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
69-
/// let b = randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
70-
/// let c = randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
71-
/// let d = join_many![2, a, b, c];
70+
/// let a = &randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
71+
/// let b = &randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
72+
/// let c = &randu::<f32>(Dim4::new(&[5, 3, 1, 1])).unwrap();
73+
/// let d = join_many![2; a, b, c];
7274
/// # }
7375
/// ```
7476
///

0 commit comments

Comments
 (0)