@@ -2,7 +2,7 @@ rust-numpy
22=========== 
33[ ![ Actions Status] ( https://github.com/PyO3/rust-numpy/workflows/CI/badge.svg )] ( https://github.com/PyO3/rust-numpy/actions ) 
44[ ![ Crate] ( https://img.shields.io/crates/v/numpy.svg )] ( https://crates.io/crates/numpy ) 
5- [ ![ Minimum rustc 1.63 ] ( https://img.shields.io/badge/rustc-1.63 +-blue.svg )] ( https://rust-lang.github.io/rfcs/2495-min-rust-version.html ) 
5+ [ ![ Minimum rustc 1.74 ] ( https://img.shields.io/badge/rustc-1.74 +-blue.svg )] ( https://rust-lang.github.io/rfcs/2495-min-rust-version.html ) 
66[ ![ Documentation] ( https://docs.rs/numpy/badge.svg )] ( https://docs.rs/numpy ) 
77[ ![ codecov] ( https://codecov.io/gh/PyO3/rust-numpy/branch/main/graph/badge.svg )] ( https://codecov.io/gh/PyO3/rust-numpy ) 
88
@@ -13,7 +13,7 @@ Rust bindings for the NumPy C-API.
1313-  [ Current main] ( https://pyo3.github.io/rust-numpy ) 
1414
1515## Requirements  
16- -  Rust >= 1.63 .0
16+ -  Rust >= 1.74 .0
1717  -  Basically, our MSRV follows the one of [ PyO3] ( https://github.com/PyO3/pyo3 ) 
1818-  Python >= 3.7
1919  -  Python 3.6 support was dropped from 0.16
@@ -38,17 +38,17 @@ name = "rust_ext"
3838crate-type  = [" cdylib" 
3939
4040[dependencies ]
41- pyo3  = { version  = " 0.22 " features  = [" extension-module" 
42- numpy  = " 0.22 " 
41+ pyo3  = { version  = " 0.27 " features  = [" extension-module" 
42+ numpy  = " 0.27 " 
4343``` 
4444
4545``` rust 
46- use  numpy :: ndarray :: {ArrayD , ArrayViewD , ArrayViewMutD };
47- use  numpy :: {IntoPyArray , PyArrayDyn , PyReadonlyArrayDyn , PyArrayMethods };
48- use  pyo3 :: {pymodule, types :: PyModule , PyResult , Python , Bound };
46+ #[pyo3:: pymodule]
47+ mod  rust_ext  {
48+     use  numpy :: ndarray :: {ArrayD , ArrayViewD , ArrayViewMutD };
49+     use  numpy :: {IntoPyArray , PyArrayDyn , PyReadonlyArrayDyn , PyArrayMethods };
50+     use  pyo3 :: {pyfunction, PyResult , Python , Bound };
4951
50- #[pymodule]
51- fn  rust_ext <'py >(_py :  Python <'py >, m :  & Bound <'py , PyModule >) ->  PyResult <()> {
5252    //  example using immutable borrows producing a new array
5353    fn  axpy (a :  f64 , x :  ArrayViewD <'_ , f64 >, y :  ArrayViewD <'_ , f64 >) ->  ArrayD <f64 > {
5454        a  *  & x  +  & y 
@@ -60,8 +60,7 @@ fn rust_ext<'py>(_py: Python<'py>, m: &Bound<'py, PyModule>) -> PyResult<()> {
6060    }
6161
6262    //  wrapper of `axpy`
63-     #[pyfn(m)]
64-     #[pyo3(name =  " axpy" 
63+     #[pyfunction(name =  " axpy" 
6564    fn  axpy_py <'py >(
6665        py :  Python <'py >,
6766        a :  f64 ,
@@ -75,14 +74,11 @@ fn rust_ext<'py>(_py: Python<'py>, m: &Bound<'py, PyModule>) -> PyResult<()> {
7574    }
7675
7776    //  wrapper of `mult`
78-     #[pyfn(m)]
79-     #[pyo3(name =  " mult" 
77+     #[pyfunction(name =  " mult" 
8078    fn  mult_py <'py >(a :  f64 , x :  & Bound <'py , PyArrayDyn <f64 >>) {
8179        let  x  =  unsafe  { x . as_array_mut () };
8280        mult (a , x );
8381    }
84- 
85-     Ok (())
8682}
8783``` 
8884
@@ -93,8 +89,8 @@ fn rust_ext<'py>(_py: Python<'py>, m: &Bound<'py, PyModule>) -> PyResult<()> {
9389name  = " numpy-test" 
9490
9591[dependencies ]
96- pyo3  = { version  = " 0.22 " features  = [" auto-initialize" 
97- numpy  = " 0.22 " 
92+ pyo3  = { version  = " 0.27 " features  = [" auto-initialize" 
93+ numpy  = " 0.27 " 
9894``` 
9995
10096``` rust 
@@ -132,7 +128,7 @@ on anything but that exact range. It can therefore be necessary to manually unif
132128For example, if you specify the following dependencies
133129
134130``` toml 
135- numpy  = " 0.22 " 
131+ numpy  = " 0.27 " 
136132ndarray  = " 0.15" 
137133``` 
138134
0 commit comments