File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,32 @@ You can also automatically specify python version in `setup.py`,
4545using [ setuptools-rust] ( https://github.com/PyO3/setuptools-rust ) .
4646
4747
48+ ## Dependency on ndarray
49+
50+ This crate uses types from ` ndarray ` in its public API. ` ndarray ` is re-exported
51+ in the crate root so that you do not need to specify it as a direct dependency.
52+
53+ Furthermore, this crate is compatible multiple versions of ` ndarray ` and therefore depends
54+ on a range of semver-incompatible versions, currently ` >= 0.13, < 0.16 ` . Cargo does not
55+ automatically choose a single version of ` ndarray ` by itself if you depend directly or indirectly
56+ on anything but that exact range. It can therefore be necessary to manually unify these dependencies.
57+
58+ For example, if you specify the following dependencies
59+
60+ ``` toml
61+ numpy = " 0.14"
62+ ndarray = " 0.13"
63+ ```
64+
65+ this will currently depend on both version ` 0.13.1 ` and ` 0.15.3 ` of ` ndarray ` by default
66+ even though ` 0.13.1 ` is within the range ` >= 0.13, < 0.16 ` . To fix this, you can run
67+
68+ ``` sh
69+ cargo update ---package ndarray:0.15.3 --precise 0.13.1
70+ ```
71+
72+ to achieve a single dependency on version ` 0.13.1 ` of ` ndarray ` .
73+
4874## Example
4975
5076
You can’t perform that action at this time.
0 commit comments