Skip to content

Commit 123fbb5

Browse files
committed
Fix README example
1 parent a3ba23b commit 123fbb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn main_<'py>(py: Python<'py>) -> PyResult<()> {
8484
let pyarray: &PyArray1<i32> = py
8585
.eval("np.absolute(np.array([-1, -2, -3], dtype='int32'))", Some(&dict), None)?
8686
.extract()?;
87-
let slice = pyarray.as_slice();
87+
let slice = pyarray.as_slice()?;
8888
assert_eq!(slice, &[1, 2, 3]);
8989
Ok(())
9090
}

0 commit comments

Comments
 (0)