Skip to content

Commit 1493cb6

Browse files
committed
DOC: Edit ndarray-rand docs and rand links
Use no tighter version spec in the link than in our dependency - docs.rs resolves this as wanted. (You can link to 0, 1, or ^0.7 or * as the version etc as needed)
1 parent a364cc8 commit 1493cb6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ndarray-rand/src/lib.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2016 bluss and ndarray developers.
1+
// Copyright 2016-2019 bluss and ndarray developers.
22
//
33
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
44
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
@@ -12,12 +12,16 @@
1212
//!
1313
//! ## Note
1414
//!
15-
//! `ndarray-rand` depends on [`rand` 0.7.0](https://docs.rs/rand/0.7.0/rand/).
15+
//! `ndarray-rand` depends on [`rand` 0.7][rand].
1616
//!
17-
//! [`rand`](https://docs.rs/rand/0.7.0/rand/) and [`rand-distr`](https://docs.rs/rand_distr/0.2.1/rand_distr/)
17+
//! [`rand`][rand] and [`rand_distr`][rand_distr]
1818
//! are re-exported as sub-modules, [`ndarray_rand::rand`](rand/index.html)
1919
//! and [`ndarray_rand::rand_distr`](rand_distr/index.html) respectively.
20-
//! Please rely on these submodules for guaranteed version compatibility.
20+
//! You can use these submodules for guaranteed version compatibility or
21+
//! convenience.
22+
//!
23+
//! [rand]: https://docs.rs/rand/0.7
24+
//! [rand_distr]: https://docs.rs/rand_distr/0.2
2125
//!
2226
//! If you want to use a random number generator or distribution from another crate
2327
//! with `ndarray-rand`, you need to make sure that the other crate also depends on the
@@ -32,12 +36,12 @@ use crate::rand::{thread_rng, Rng, SeedableRng};
3236
use ndarray::ShapeBuilder;
3337
use ndarray::{ArrayBase, DataOwned, Dimension};
3438

35-
/// [`rand`](https://docs.rs/rand/0.7.0/rand/), re-exported for convenience and version-compatibility.
39+
/// [`rand`](https://docs.rs/rand/0.7), re-exported for convenience and version-compatibility.
3640
pub mod rand {
3741
pub use rand::*;
3842
}
3943

40-
/// [`rand-distr`](https://docs.rs/rand_distr/0.2.1/rand_distr/), re-exported for convenience and version-compatibility.
44+
/// [`rand-distr`](https://docs.rs/rand_distr/0.2), re-exported for convenience and version-compatibility.
4145
pub mod rand_distr {
4246
pub use rand_distr::*;
4347
}

0 commit comments

Comments
 (0)