Skip to content

Commit eca07ce

Browse files
committed
Switch to comparing against array1
1 parent 9560632 commit eca07ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/impl_constructors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,15 @@ where
340340
/// The element type is inferred; to control it, you can either specify
341341
/// type of the returned array or use turbofish syntax in the function call:
342342
/// ```
343-
/// use ndarray::Array1;
343+
/// use ndarray::{Array1, arr1};
344344
///
345345
/// // Specify f32
346346
/// let arr_f32: Array1<f32> = Array1::zeros(3);
347-
/// assert_eq!(arr_f32, [0_f32, 0.0, 0.0]);
347+
/// assert_eq!(arr_f32, arr1(&[0_f32, 0.0, 0.0]));
348348
///
349349
/// // Specify i64
350350
/// let arr_i64 = Array1::<i64>::zeros(3);
351-
/// assert_eq!(arr_i64, [0_i64, 0, 0]);
351+
/// assert_eq!(arr_i64, arr1(&[0_i64, 0, 0]));
352352
/// ```
353353
///
354354
/// **Panics** if the product of non-zero axis lengths overflows `isize`.

0 commit comments

Comments
 (0)