MCPcopy Create free account
hub / github.com/PyO3/rust-numpy / casting_respects_dimensionality

Function casting_respects_dimensionality

tests/array.rs:461–467  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

459
460#[test]
461fn casting_respects_dimensionality() {
462 Python::attach(|py| {
463 let ob = PyArray::from_slice(py, &[1_i32, 2, 3]).into_any();
464
465 assert!(ob.cast::<PyArray2<i32>>().is_err());
466 });
467}
468
469#[test]
470fn unbind_works() {

Callers

nothing calls this directly

Calls 1

from_sliceFunction · 0.85

Tested by

no test coverage detected