@@ -9,8 +9,6 @@ use std::ops::{Index, Range};
9
9
/// # Example:
10
10
///
11
11
/// ```
12
- /// extern crate ndarray_stats;
13
- /// extern crate noisy_float;
14
12
/// use ndarray_stats::histogram::{Edges, Bins};
15
13
/// use noisy_float::types::n64;
16
14
///
@@ -41,19 +39,15 @@ impl<A: Ord> From<Vec<A>> for Edges<A> {
41
39
/// # Example:
42
40
///
43
41
/// ```
44
- /// extern crate ndarray_stats;
45
- /// #[macro_use(array)]
46
- /// extern crate ndarray;
42
+ /// use ndarray::array;
47
43
/// use ndarray_stats::histogram::Edges;
48
44
///
49
- /// # fn main() {
50
45
/// let edges = Edges::from(array![1, 15, 10, 10, 20]);
51
46
/// // The array gets sorted!
52
47
/// assert_eq!(
53
48
/// edges[2],
54
49
/// 15
55
50
/// );
56
- /// # }
57
51
/// ```
58
52
fn from ( mut edges : Vec < A > ) -> Self {
59
53
// sort the array in-place
@@ -72,7 +66,6 @@ impl<A: Ord + Clone> From<Array1<A>> for Edges<A> {
72
66
/// # Example:
73
67
///
74
68
/// ```
75
- /// extern crate ndarray_stats;
76
69
/// use ndarray_stats::histogram::Edges;
77
70
///
78
71
/// let edges = Edges::from(vec![1, 15, 10, 20]);
@@ -98,7 +91,6 @@ impl<A: Ord> Index<usize> for Edges<A> {
98
91
/// # Example:
99
92
///
100
93
/// ```
101
- /// extern crate ndarray_stats;
102
94
/// use ndarray_stats::histogram::Edges;
103
95
///
104
96
/// let edges = Edges::from(vec![1, 5, 10, 20]);
@@ -118,8 +110,6 @@ impl<A: Ord> Edges<A> {
118
110
/// # Example:
119
111
///
120
112
/// ```
121
- /// extern crate ndarray_stats;
122
- /// extern crate noisy_float;
123
113
/// use ndarray_stats::histogram::Edges;
124
114
/// use noisy_float::types::n64;
125
115
///
@@ -139,8 +129,6 @@ impl<A: Ord> Edges<A> {
139
129
/// # Example:
140
130
///
141
131
/// ```
142
- /// extern crate ndarray;
143
- /// extern crate ndarray_stats;
144
132
/// use ndarray::array;
145
133
/// use ndarray_stats::histogram::Edges;
146
134
///
@@ -150,7 +138,7 @@ impl<A: Ord> Edges<A> {
150
138
/// array![0, 3, 5].view()
151
139
/// );
152
140
/// ```
153
- pub fn as_array_view ( & self ) -> ArrayView1 < A > {
141
+ pub fn as_array_view ( & self ) -> ArrayView1 < ' _ , A > {
154
142
ArrayView1 :: from ( & self . edges )
155
143
}
156
144
@@ -162,7 +150,6 @@ impl<A: Ord> Edges<A> {
162
150
/// # Example:
163
151
///
164
152
/// ```
165
- /// extern crate ndarray_stats;
166
153
/// use ndarray_stats::histogram::Edges;
167
154
///
168
155
/// let edges = Edges::from(vec![0, 2, 3]);
@@ -202,8 +189,6 @@ impl<A: Ord> Edges<A> {
202
189
/// # Example:
203
190
///
204
191
/// ```
205
- /// extern crate ndarray_stats;
206
- /// extern crate noisy_float;
207
192
/// use ndarray_stats::histogram::{Edges, Bins};
208
193
/// use noisy_float::types::n64;
209
194
///
@@ -238,8 +223,6 @@ impl<A: Ord> Bins<A> {
238
223
/// # Example:
239
224
///
240
225
/// ```
241
- /// extern crate ndarray_stats;
242
- /// extern crate noisy_float;
243
226
/// use ndarray_stats::histogram::{Edges, Bins};
244
227
/// use noisy_float::types::n64;
245
228
///
@@ -264,7 +247,6 @@ impl<A: Ord> Bins<A> {
264
247
/// # Example:
265
248
///
266
249
/// ```
267
- /// extern crate ndarray_stats;
268
250
/// use ndarray_stats::histogram::{Edges, Bins};
269
251
///
270
252
/// let edges = Edges::from(vec![0, 2, 4, 6]);
@@ -291,7 +273,6 @@ impl<A: Ord> Bins<A> {
291
273
/// # Example:
292
274
///
293
275
/// ```
294
- /// extern crate ndarray_stats;
295
276
/// use ndarray_stats::histogram::{Edges, Bins};
296
277
///
297
278
/// let edges = Edges::from(vec![0, 2, 4, 6]);
@@ -323,7 +304,6 @@ impl<A: Ord> Bins<A> {
323
304
/// # Example:
324
305
///
325
306
/// ```
326
- /// extern crate ndarray_stats;
327
307
/// use ndarray_stats::histogram::{Edges, Bins};
328
308
///
329
309
/// let edges = Edges::from(vec![1, 5, 10, 20]);
0 commit comments