MCPcopy Index your code
hub / github.com/PyO3/rust-numpy / not_contiguous_array

Function not_contiguous_array

tests/array.rs:24–33  ·  view source on GitHub ↗
(py: Python<'_>)

Source from the content-addressed store, hash-verified

22}
23
24fn not_contiguous_array(py: Python<'_>) -> Bound<'_, PyArray1<i32>> {
25 py.eval(
26 c_str!("np.array([1, 2, 3, 4], dtype='int32')[::2]"),
27 None,
28 Some(&get_np_locals(py)),
29 )
30 .unwrap()
31 .cast_into()
32 .unwrap()
33}
34
35fn not_aligned_array(py: Python<'_>) -> Bound<'_, PyArray1<u16>> {
36 py.eval(

Callers 3

as_arrayFunction · 0.85
as_raw_arrayFunction · 0.85
as_sliceFunction · 0.85

Calls 1

get_np_localsFunction · 0.70

Tested by 3

as_arrayFunction · 0.68
as_raw_arrayFunction · 0.68
as_sliceFunction · 0.68