Skip to content

Commit d02b6da

Browse files
committed
DOC: Remove 'extern crate' from all examples
Prefer Rust 2018 syntax now, no extern crate needed.
1 parent 78bd1d8 commit d02b6da

File tree

9 files changed

+0
-30
lines changed

9 files changed

+0
-30
lines changed

src/doc/ndarray_for_numpy_users/coord_transform.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
//! This is a direct translation to `ndarray`:
5050
//!
5151
//! ```
52-
//! extern crate ndarray;
53-
//!
5452
//! use ndarray::prelude::*;
5553
//!
5654
//! fn main() {
@@ -96,8 +94,6 @@
9694
//! this:
9795
//!
9896
//! ```
99-
//! extern crate ndarray;
100-
//!
10197
//! use ndarray::prelude::*;
10298
//!
10399
//! fn main() {

src/doc/ndarray_for_numpy_users/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@
177177
//! and `ndarray` like this:
178178
//!
179179
//! ```
180-
//! extern crate ndarray;
181-
//!
182180
//! use ndarray::prelude::*;
183181
//! #
184182
//! # fn main() {}

src/doc/ndarray_for_numpy_users/rk_step.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@
7171
//! A direct translation to `ndarray` looks like this:
7272
//!
7373
//! ```
74-
//! extern crate ndarray;
75-
//!
7674
//! use ndarray::prelude::*;
7775
//!
7876
//! fn rk_step<F>(
@@ -129,8 +127,6 @@
129127
//! some places, but that's not demonstrated in the example below.
130128
//!
131129
//! ```
132-
//! extern crate ndarray;
133-
//!
134130
//! use ndarray::prelude::*;
135131
//!
136132
//! fn rk_step<F>(

src/doc/ndarray_for_numpy_users/simple_math.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
//! <td>
5252
//!
5353
//! ```
54-
//! extern crate ndarray;
55-
//!
5654
//! use ndarray::prelude::*;
5755
//!
5856
//! # fn main() {

src/parallel/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
//! Compute the exponential of each element in an array, parallelized.
4040
//!
4141
//! ```
42-
//! extern crate ndarray;
43-
//!
4442
//! use ndarray::Array2;
4543
//! use ndarray::parallel::prelude::*;
4644
//!
@@ -61,8 +59,6 @@
6159
//! Use the parallel `.axis_iter()` to compute the sum of each row.
6260
//!
6361
//! ```
64-
//! extern crate ndarray;
65-
//!
6662
//! use ndarray::Array;
6763
//! use ndarray::Axis;
6864
//! use ndarray::parallel::prelude::*;
@@ -84,8 +80,6 @@
8480
//! Use the parallel `.axis_chunks_iter()` to process your data in chunks.
8581
//!
8682
//! ```
87-
//! extern crate ndarray;
88-
//!
8983
//! use ndarray::Array;
9084
//! use ndarray::Axis;
9185
//! use ndarray::parallel::prelude::*;
@@ -107,8 +101,6 @@
107101
//! Use zip for lock step function application across several arrays
108102
//!
109103
//! ```
110-
//! extern crate ndarray;
111-
//!
112104
//! use ndarray::Array3;
113105
//! use ndarray::Zip;
114106
//!

src/parallel/zipmacro.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
/// ## Examples
3535
///
3636
/// ```rust
37-
/// extern crate ndarray;
38-
///
3937
/// use ndarray::Array2;
4038
/// use ndarray::parallel::par_azip;
4139
///

src/slice.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,6 @@ impl_slicenextdim_larger!((), Slice);
496496
/// # Example
497497
///
498498
/// ```
499-
/// extern crate ndarray;
500-
///
501499
/// use ndarray::{s, Array2, ArrayView2};
502500
///
503501
/// fn laplacian(v: &ArrayView2<f32>) -> Array2<f32> {
@@ -528,8 +526,6 @@ impl_slicenextdim_larger!((), Slice);
528526
/// For example,
529527
///
530528
/// ```
531-
/// # extern crate ndarray;
532-
/// #
533529
/// # use ndarray::prelude::*;
534530
/// #
535531
/// # fn main() {

src/stacking.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ where
8686
/// ***Panics*** if the `stack` function would return an error.
8787
///
8888
/// ```
89-
/// extern crate ndarray;
90-
///
9189
/// use ndarray::{arr2, stack, Axis};
9290
///
9391
/// # fn main() {

src/zip/zipmacro.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
/// ## Examples
3939
///
4040
/// ```rust
41-
/// extern crate ndarray;
42-
///
4341
/// use ndarray::{azip, Array1, Array2, Axis};
4442
///
4543
/// type M = Array2<f32>;

0 commit comments

Comments
 (0)