Skip to content

Commit a2700a1

Browse files
authored
Merge pull request #86 from kngwyu/release0.4.0
Bump version to 0.4.0
2 parents 0886ab7 + 145d617 commit a2700a1

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

Cargo.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
[package]
22
name = "numpy"
3-
version = "0.4.0-alpha.1"
4-
authors = ["Toshiki Teramura <[email protected]>"]
5-
3+
version = "0.4.0"
4+
authors = ["Toshiki Teramura <[email protected]>", "Yuji Kanagawa <[email protected]>"]
65
description = "Rust binding of NumPy C-API"
7-
documentation = "https://docs.rs/numpy/"
8-
repository = "https://github.com/termoshtt/rust-numpy"
6+
documentation = "https://rust-numpy.github.io/rust-numpy/numpy"
7+
repository = "https://github.com/rust-numpy/rust-numpy"
98
keywords = ["numpy", "python", "binding"]
109
license-file = "LICENSE"
1110

1211
[dependencies]
1312
cfg-if = "0.1.6"
14-
libc = "0.2.43"
13+
libc = "0.2.44"
1514
num-complex = "0.2.1"
1615
num-traits = "0.2.6"
17-
ndarray = "0.12.0"
18-
pyo3 = "= 0.5.0"
16+
ndarray = "0.12"
17+
pyo3 = "0.5.2"
1918

2019
[features]
2120
# In default setting, python version is automatically detected

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
4040
features = ["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

4848
Example
@@ -56,8 +56,8 @@ Example
5656
name = "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

8080
fn 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"
100100
crate-type = ["cdylib"]
101101

102102
[dependencies]
103-
numpy = "0.4.0-alpha.1"
103+
numpy = "0.4.0"
104104
ndarray = "0.12"
105105

106106
[dependencies.pyo3]
107-
version = "^0.5.0-alpha.2"
107+
version = "0.5.2"
108108
features = ["extension-module"]
109109
```
110110

@@ -157,11 +157,13 @@ fn rust_ext(_py: Python, m: &PyModule) -> PyResult<()> {
157157
Contribution
158158
-------------
159159
This 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

162164
Version
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>`

examples/simple-extension/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ numpy = { path = "../.." }
1212
ndarray = "0.12"
1313

1414
[dependencies.pyo3]
15-
version = "= 0.5.0"
15+
version = "0.5.2"
1616
features = ["extension-module"]

0 commit comments

Comments
 (0)