@@ -36,13 +36,13 @@ If you want to compile for Python2, please add a feature flag in `Cargo.toml` li
3636
3737``` toml
3838[dependencies .numpy ]
39- version = " 0.4.0-alpha.1 "
39+ version = " 0.4.0"
4040features = [" python2" ]
4141```
4242.
4343
44- You can also automatically specify python version in [ setup.py] ( examples/simple-extension/setup.py )
45- , using [ setuptools-rust] ( https://github.com/PyO3/setuptools-rust ) .
44+ You can also automatically specify python version in [ setup.py] ( examples/simple-extension/setup.py ) ,
45+ using [ setuptools-rust] ( https://github.com/PyO3/setuptools-rust ) .
4646
4747
4848Example
@@ -56,8 +56,8 @@ Example
5656name = " numpy-test"
5757
5858[dependencies ]
59- pyo3 = " ^ 0.5.0-alpha .2"
60- numpy = " 0.4.0-alpha.1 "
59+ pyo3 = " 0.5.2"
60+ numpy = " 0.4.0"
6161```
6262
6363``` rust
@@ -78,11 +78,11 @@ fn main() -> Result<(), ()> {
7878}
7979
8080fn main_ <'py >(py : Python <'py >) -> PyResult <()> {
81- let np = get_array_module ( py )? ;
81+ let np = py . import ( " numpy " )? ;
8282 let dict = PyDict :: new (py );
8383 dict . set_item (" np" , np )? ;
8484 let pyarray : & PyArray1 <i32 > = py
85- . eval (" np.array([1, 2, 3], dtype='int32')" , Some (& dict ), None )?
85+ . eval (" np.absolute(np. array([- 1, - 2, - 3], dtype='int32') )" , Some (& dict ), None )?
8686 . extract ()? ;
8787 let slice = pyarray . as_slice ();
8888 assert_eq! (slice , & [1 , 2 , 3 ]);
@@ -100,11 +100,11 @@ name = "rust_ext"
100100crate-type = [" cdylib" ]
101101
102102[dependencies ]
103- numpy = " 0.4.0-alpha.1 "
103+ numpy = " 0.4.0"
104104ndarray = " 0.12"
105105
106106[dependencies .pyo3 ]
107- version = " ^ 0.5.0-alpha .2"
107+ version = " 0.5.2"
108108features = [" extension-module" ]
109109```
110110
@@ -157,11 +157,13 @@ fn rust_ext(_py: Python, m: &PyModule) -> PyResult<()> {
157157Contribution
158158-------------
159159This project is still in pre-alpha.
160- We need your feedback. Don't hesitate to open [ issues] ( https://github.com/termoshtt/rust-numpy/issues ) !
160+
161+ We need your feedback.
162+ Don't hesitate to open [ issues] ( https://github.com/termoshtt/rust-numpy/issues ) !
161163
162164Version
163165--------
164- - v0.4.0(coming soon)
166+ - v0.4.0
165167 - Duplicate ` PyArrayModule ` and import Numpy API automatically
166168 - Fix memory leak of ` IntoPyArray ` and add ` ToPyArray ` crate
167169 - PyArray has dimension as type parameter. Now it looks like ` PyArray<T, D> `
0 commit comments