@@ -6,14 +6,12 @@ rust-numpy
6
6
7
7
Rust bindings for the NumPy C-API
8
8
9
- API documentation
10
- -------------
9
+ ## API documentation
11
10
- [ Latest release (possibly broken)] ( https://docs.rs/numpy )
12
11
- [ Current Master] ( https://rust-numpy.github.io/rust-numpy )
13
12
14
13
15
- Requirements
16
- -------------
14
+ ## Requirements
17
15
- current nightly rust (see https://github.com/PyO3/pyo3/issues/5 for nightly features, and
18
16
https://github.com/PyO3/pyo3/blob/master/build.rs for minimum required version)
19
17
- some rust libraries
@@ -26,17 +24,20 @@ https://github.com/PyO3/pyo3/blob/master/build.rs for minimum required version)
26
24
Starting from 0.3, rust-numpy migrated from rust-cpython to pyo3.
27
25
If you want to use rust-cpython, use version 0.2.1 from crates.io.
28
26
29
- Supported python version
30
- -------------
31
- Currently 2.7, 3.5, 3.6, 3.7 are supported.
27
+ ## Supported Python version
32
28
33
- By default, rust-numpy is built for Python3 .
29
+ Currently 3.5, 3.6, 3.7 are supported .
34
30
35
- If you want to compile for Python2, please add a feature flag in ` Cargo.toml ` like
36
31
32
+ ## Python2 Support
33
+ Version 0.5.0 is the last version that supports Python2.
34
+
35
+ If you want to compile this library with Python2, please use 0.5.0 from crates.io.
36
+
37
+ In addition, you have to add a feature flag in ` Cargo.toml ` like
37
38
``` toml
38
39
[dependencies .numpy ]
39
- version = " 0.4 .0"
40
+ version = " 0.5 .0"
40
41
features = [" python2" ]
41
42
```
42
43
.
@@ -45,19 +46,18 @@ You can also automatically specify python version in [setup.py](examples/simple-
45
46
using [ setuptools-rust] ( https://github.com/PyO3/setuptools-rust ) .
46
47
47
48
48
- Example
49
- ---------
49
+ ## Example
50
50
51
51
52
- ## Execute a Python program from Rust and get results
52
+ ### Execute a Python program from Rust and get results
53
53
54
54
``` toml
55
55
[package ]
56
56
name = " numpy-test"
57
57
58
58
[dependencies ]
59
- pyo3 = " 0.5.2 "
60
- numpy = " 0.4 .0"
59
+ pyo3 = " 0.6.0 "
60
+ numpy = " 0.5 .0"
61
61
```
62
62
63
63
``` rust
@@ -90,7 +90,7 @@ fn main_<'py>(py: Python<'py>) -> PyResult<()> {
90
90
}
91
91
```
92
92
93
- ## Write a Python module in Rust
93
+ ### Write a Python module in Rust
94
94
95
95
Please see the [ example] ( example ) directory for a complete example
96
96
@@ -100,11 +100,11 @@ name = "rust_ext"
100
100
crate-type = [" cdylib" ]
101
101
102
102
[dependencies ]
103
- numpy = " 0.4 .0"
103
+ numpy = " 0.5 .0"
104
104
ndarray = " 0.12"
105
105
106
106
[dependencies .pyo3 ]
107
- version = " 0.5.2 "
107
+ version = " 0.6.0 "
108
108
features = [" extension-module" ]
109
109
```
110
110
@@ -154,15 +154,15 @@ fn rust_ext(_py: Python, m: &PyModule) -> PyResult<()> {
154
154
}
155
155
```
156
156
157
- Contribution
158
- -------------
159
- This project is still in pre-alpha.
157
+ ## Contribution
158
+ We need your feedback.
159
+
160
+ Don't hesitate to open [ issues] ( https://github.com/rust-numpy/rust-numpy/issues ) !
160
161
161
- We need your feedback.
162
- Don't hesitate to open [ issues] ( https://github.com/termoshtt/rust-numpy/issues ) !
162
+ ## Version
163
+ - v0.5.0
164
+ - Update PyO3 to 0.6
163
165
164
- Version
165
- --------
166
166
- v0.4.0
167
167
- Duplicate ` PyArrayModule ` and import Numpy API automatically
168
168
- Fix memory leak of ` IntoPyArray ` and add ` ToPyArray ` crate
@@ -190,4 +190,4 @@ Version
190
190
191
191
- v0.1.0
192
192
- First Release
193
- - Expose unsafe interfase of Array and UFunc API
193
+ - Expose unsafe interface of Array and UFunc API
0 commit comments